Grand_master 0 Posted March 8, 2006 Report Share Posted March 8, 2006 I have a simple question:What is the difference between an element with display:block and that is then floated, and another element with display:inline? Context: I see many tutorials on how to create horizontal navigation bars, some use display:inline (and that makes sense to me), but others use display:block and then float the list. What is the logic behind this?Thanks! Quote Link to post Share on other sites
Grand_master 0 Posted March 8, 2006 Author Report Share Posted March 8, 2006 Oops, follow-up question: why after making the LI display block and floating it, why make the "a" element also display block? Here's the code I'm looking at: http://css.maxdesign.com.au/listamatic/horizontal10.htm Quote Link to post Share on other sites
boen_robot 107 Posted March 8, 2006 Report Share Posted March 8, 2006 It's just that block elements have different abilities, which inline elements don't have and vice versa. For example, block elements can have explicit demensions, which is why sometimes you see links being displayed as blocks. I don't know other differences though. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.