# Two questions : is it correct to employ a div with spacer function?

**URL:** <https://forum.kirupa.com/t/two-questions-is-it-correct-to-employ-a-div-with-spacer-function/327218>\
**Category:** Uncategorized\
**Created:** [February 13, 2012, 3:31pm UTC](https://forum.kirupa.com/t/two-questions-is-it-correct-to-employ-a-div-with-spacer-function/327218 "2012-02-13T15:31:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![multimediamkt](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@multimediamkt](https://forum.kirupa.com/u/multimediamkt)\
**Post date:** [February 13, 2012, 3:31pm UTC](https://forum.kirupa.com/t/two-questions-is-it-correct-to-employ-a-div-with-spacer-function/327218/1 "2012-02-13T15:31:50Z")

</div>

\*\*

In the attempt to comprehend CSS better I have studied a 3 column fixed lay out. I have some doubts

• what is the use for #navbar a{heigth:28px; line-height:28px; padding:0 8px; display:inline;} , if " navbar a" is not a div in the html code ??  
However if I delete it the position of navbar changes a bit.

• div.spacer{clear:both; height:10px; display:block;} : is it a correct practice to use a div with spacer function ? is it a poor solution ? (reminds the old fashioned time of table design on which transparent .gifs were used as spacers)  
(there´s a comment on the css code not to remove this div as it solves an issue about container height ?)

Thank for your support.

\*\*

…  
\<body\>

\<div id=“container”\>

\<div id=“topbar”\>\<p id=“topbarclass”\>TOP BAR \</p\>\</div\>  
\<div id=“navbar”\>

\</div\>

\<div id=“main”\>  
\<div id=“column\_left”\>  
\</div\>

\<div id=“column\_right”\>

\</div\>  
\<div id=“column\_right\_adsense”\>

\</div\>  
\<!-- Don’t remove spacer div. Solve an issue about container height --\>  
\<div class=“spacer”\>\</div\>  
\</div\>  
\<div id=“footer”\>\</div\>  
\</div\>
