XMLTorrent Posted November 15, 2005 Share Posted November 15, 2005 In CSS, I see the display keyword used often and a corresponding value 'block' used. Just what are these and what's the difference if you use them or don't? Link to comment Share on other sites More sharing options...
Jonas Posted November 15, 2005 Share Posted November 15, 2005 http://www.w3schools.com/css/pr_class_display.asp Link to comment Share on other sites More sharing options...
XMLTorrent Posted November 15, 2005 Author Share Posted November 15, 2005 So basically it's just like a paragraph? Link to comment Share on other sites More sharing options...
Jonas Posted November 15, 2005 Share Posted November 15, 2005 Without the bottom-margin... Link to comment Share on other sites More sharing options...
F-Man Posted November 16, 2005 Share Posted November 16, 2005 A paragraph is of display: block by default. Link to comment Share on other sites More sharing options...
Jonas Posted November 16, 2005 Share Posted November 16, 2005 What about div? Link to comment Share on other sites More sharing options...
F-Man Posted November 16, 2005 Share Posted November 16, 2005 What about div?<{POST_SNAPBACK}> Also block. The default styling for p and div would be something like this:p { display: block; margin: 0.5em 0; /* Not the same on all browsers */}div { display: block; /* No margin */} Link to comment Share on other sites More sharing options...
Jack McKalling Posted November 23, 2005 Share Posted November 23, 2005 So basically, the "display" property assigns or refers to the way how an element is showed.The exact way, is different for each browser, so I would use it only for NOT-displaying an element, or not NOT-displaying an element :)Like display="none" and display="" instead of display="block"But I may be wrong, it can be very handy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now