hi
i'm learning css from w3schools . i look through all examples ,
i check below code that belongs to http://www.w3schools.com/css/tryit.a...ss_sprites_nav page unfortunatly i cant understand what is display:block; declation for #navlist li selector for , would you please describe me what's cause of use that, i remove that from css then check this html file in my browser in firefox 4 and IE 6 all thing are okay,
and the other my question is , are'nt li element block level element naturally ?
thanks alot for your help.
i'm learning css from w3schools . i look through all examples ,
i check below code that belongs to http://www.w3schools.com/css/tryit.a...ss_sprites_nav page unfortunatly i cant understand what is display:block; declation for #navlist li selector for , would you please describe me what's cause of use that, i remove that from css then check this html file in my browser in firefox 4 and IE 6 all thing are okay,
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
#navlist{position:relative;}
#navlist li{margin:0;padding:0;list-style:none;position:absolute;top:0;}
#navlist li, #navlist a{height:44px;display:block;}
#home{left:0px;width:46px;}
#home{background:url('img_navsprites.gif') 0 0;}
#prev{left:63px;width:43px;}
#prev{background:url('img_navsprites.gif') -47px 0;}
#next{left:129px;width:43px;}
#next{background:url('img_navsprites.gif') -91px 0;}
</style>
</head>
<body>
<ul id="navlist">
<li id="home"><a href="default.asp"></a></li>
<li id="prev"><a href="css_intro.asp"></a></li>
<li id="next"><a href="css_syntax.asp"></a></li>
</ul>
</body>
</html>
thanks alot for your help.
Comment