2 replies [Last post]
Ron Wolpa
Ron Wolpa's picture
Offline
newbie
Last seen: 2 years 12 weeks ago
Timezone: GMT-3
Joined: 2012-02-14
Posts: 5
Points: 8

Puzzled )
My friends I have 2 questions :

• 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)
(note that 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>
 [code]

Tony
Tony's picture
Online
Moderator
Brisbane
Last seen: 3 min 58 sec ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5098
Points: 2682

Hi Ron, If you remove the

Hi Ron,
If you remove the rule the line-height of navbar links will return to something like 1em. That may affect the height of the navbar.
Since it is displaying:inline not much else there is doing anything.

Yes a spacer div is pretty old way of doing things. Something must require clearing http://csscreator.com/attributes/containedfloat.php

balajidesign
balajidesign's picture
Offline
Enthusiast
Last seen: 44 weeks 1 day ago
Timezone: GMT+5.5
Joined: 2012-01-31
Posts: 116
Points: 124

• what is the use for #navbar

• 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 ??
Yes navbar a is not a div. but line-height of text should increase the text height.

• 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)
(note that there´s a comment on the css code not to remove this div as it solves an issue about container height ??? whatever browser will understand that spacer. if it is transparent gif image. some pixel gap we needed.