Home >Web Front-end >CSS Tutorial >How to Make a `` Container Always Fill the Entire Screen?
How to Ensure a Full-Screen Achieving a full-screen Solution: The following HTML and CSS code ensures a consistently full-screen CSS Breakdown: Compatibility: This solution works well in all major browsers, including IE. For optimal display in IE 6 or earlier, an additional CSS rule is included: Usage: Simply include the HTML and CSS code in your document, and any The above is the detailed content of How to Make a `` Container Always Fill the Entire Screen?. For more information, please follow other related articles on the PHP Chinese website!<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<style type="text/css">
html, body {
height: 100%;
margin: 0;
}
#wrapper {
min-height: 100%;
}
</style>
</head>
<body>
<div>
<!--[if lte IE 6]>
<style type="text/css">
#container {
height: 100%;
}
</style>
<![endif]-->