Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Space between divs - Why?

Started 1 month, 2 weeks ago by djpete
default template from DW. I get these white gaps and cant get rid of them. Going mad. Any advice for a newbie appreciated. Code and pic... Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition al.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <me ta http-equiv="Content-Type" ...
Site: Dev Shed Forums - Open Source web development  Dev Shed Forums - Open Source web development - site profile
Forum: CSS Help  CSS Help - forum profile
Total authors: 2 authors
Total thread posts: 5 posts
Thread activity: no new posts during last week
Domain info for: devshed.com

Other posts in this thread:

DonR replied 1 month, 2 weeks ago
at the top of your style css add: html{margin:0;padding:0;} (above the body{}) to reset things.

djpete replied 1 month, 2 weeks ago
Quote: Originally Posted by DonR at the top of your style css add: html{margin:0;padding:0;} (above the body{}) to reset things. zeroing the margin and padding in body element isn't good enough it seems thats why you should always add the html element/property in your css and zero margin/padding in there too. Greatly appreciate the help Don. ...

djpete replied 1 month, 2 weeks ago
Quote: Originally Posted by djpete Greatly appreciate the help Don. This is what I did but still same. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition al.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" ...

djpete replied 1 month, 2 weeks ago
This solved my problem. Apparently its a collapsing div common prob which I don't really get but would like to know in a simple way!!! You can fix it very easily though by un-collapsing your margins with either a top & bottom border, top & bottom padding, or overflow:hidden. I just did one of those to the maincontent div and all fixed!!

 

Top contributing authors

Name
Posts
djpete
4
user's latest post:
Space between divs - Why?
Published (2009-11-12 22:20:00)
This solved my problem. Apparently its a collapsing div common prob which I don't really get but would like to know in a simple way!!! You can fix it very easily though by un-collapsing your margins with either a top &amp; bottom border, top &amp; bottom padding, or overflow:hidden. I just did one of those to the maincontent div and all fixed!!
DonR
2
user's latest post:
Space between divs - Why?
Published (2009-11-12 21:07:00)
at the top of your style css add: html{margin:0;padding:0;} (above the body{}) to reset things.

Related threads on "Dev Shed Forums - Open Source web development":

Related threads on other sites:

Thread profile page for "Space between divs - Why?" on http://www.devshed.com. This report page is a snippet summary view from a single thread "Space between divs - Why?", located on the Message Board at http://www.devshed.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity