Jump to content

Block and inline


Grand_master
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...