html - Why is the container div used in this particular way? I see it used like this all the time -


for simple use case example check out below:

<html>  <head>  <meta charset="utf-8">  <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">  <title>a question stackflow community</title> <link rel="stylesheet" type="text/css" href="css/global.css">  </head>     <body>  <script src="../js/cool-awesome-jquery.min.js"></script>      <div id="container"></div>     <div id="call-to-action">dude need buy stuff!!</div>     <div id="menu">         <button id="home">home</button>     </div>  <script>yada yada yada....</script>      </body>  </html> 

i know browsers offer native relationship container div, or @ least can. see use case alot in code, container div created closed. no special css being used within global.css file in example. can see, no style tags being used add special either. asking is, why this? purpose serve?

as sidenote, body tag outside of container tag, whereas assume inverse true, @ least follow expected clean semantic markup. knowledge or feedback community appreciated. answer deserves upvote sure. thank you!

-cheers, branden dnae

too vague pinpoint exact answer, overall probable effect have content outside of container (typically) pinned atop container (or @ least pinned in front, if hidden), ala position:fixed; either 100% of time, banner/header, or perhaps upon user interaction...so think lightbox.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -