max-width

The max-width CSS property is used to set the maximum width of a given element. It prevents the used value of the width property from becoming larger than the value specified for max-width.
 
max-width overrides width, but min-width overrides max-width.

Example

<!DOCTYPE html>
<html>
<head>
<style>
body {
	max-width: 40em;
}

table {
	max-width: 75%;
}

div {
	max-width: none;
}
</style>
</head>
<body>
	<table>
		<tr>
			<td>1</td>
			<td>2</td>
		</tr>
		<tr>
			<td>3</td>
			<td>4</td>
		</tr>
	</table>
	<div>the quick brown red fox jumps over the lazy dog</div>
</body>
</html>