468,238 Members | 1,847 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,238 developers. It's quick & easy.

Assistance Requested: Margins refusing to disappear?

Hi all,
Thanks for providing this forum. I know every other poster tries to hammer the time-sensitivity point, so I'll forego that. Suffice to say, Monday is go-day.
I'm having an issue getting my margins to disappear. I've tried all sorts of manipulations on my margin and padding tags, all to no avail. On the page below, I've temporarily set the container's background to grey to illuminate the gaps I want to disappear within "container."

http://www.alternium.net/Bodie/index.html
Here's my css:

Expand|Select|Wrap|Line Numbers
  1. /* CSS Document */
  2. /* CSS Document */
  3.  
  4. html,body {
  5.     background-color: #c6c6c6;
  6.     margin:0px; 
  7.     padding:0px; 
  8.     min-width:700px;
  9.     font-family: Geneva, Arial, Helvetica, sans-serif;
  10.     color: #000000;
  11.     font-size:100%;
  12.     font-style: normal;
  13.     line-height: normal;
  14.     font-weight: normal;
  15.     text-align:center;
  16.     text-decoration: none;
  17. }
  18. #container {
  19.     margin-top:0px;
  20.     margin-left:auto;
  21.     margin-right:auto;
  22.     margin-bottom:0px;
  23.     float: none;
  24. /*    background-color:#ffffff;*/
  25.     background-color:#999999;
  26.     text-align: left;
  27.     width:700px;
  28.     padding:0px;
  29. }
  30. #banner{
  31.      margin-left:0px;
  32.     margin-bottom:4px;
  33.     margin-top:0px;
  34.     margin-right:0px;
  35. /*    margin:auto;*/
  36.     width:700px;
  37.     height:130px;
  38.     background-color: #ffffff;
  39.     padding:0px;
  40. }
  41. #navigation{
  42.     background-color:#ff2700;
  43.     width:700px;
  44.     height:45;
  45.     padding:0px;
  46.      margin-left:0px;
  47.     margin-bottom:4px;
  48.     margin-top:0px;
  49.     margin-right:0px;
  50. }
  51. #body {
  52.     width:700px;
  53.     height:98px;
  54.     background-color:#ffffff;
  55.     padding:0px;
  56.      margin-left:0px;
  57.     margin-bottom:4px;
  58.     margin-top:0px;
  59.     margin-right:0px;
  60.  
  61. /*    background:url(images/top.jpg) no-repeat;*/
  62. }
  63. #footer {
  64.     background-color: ;
  65.     width:700px;
  66.     height:72px;
  67.     background-color:#ff2700;
  68.     padding:0px;
  69.      margin-left:0px;
  70.     margin-bottom:4px;
  71.     margin-top:0px;
  72.     margin-right:0px;
  73.  
  74. /*    background:url(images/bottom.jpg) no-repeat;*/
  75.  
If anyone has a helpful pointer, I'd love to hear it.
Thanks!
-Ars
Mar 16 '07 #1
4 1287
drhowarddrfine
7,435 Expert 4TB
Many elements have a default margin on them. To get rid of all of them, just add this to your css:
*{margin:0;padding:0}

That will require some adjusting of each element but it gets rid of the gaps.
Mar 16 '07 #2
Many elements have a default margin on them. To get rid of all of them, just add this to your css:
*{margin:0;padding:0}

That will require some adjusting of each element but it gets rid of the gaps.
I actually tried setting the generic margin to 0 and that didn't work which is why I then tried setting each margin to 0 or 4 individually. I'm thinking there might be a problem with my HTML or the way I'm organizing my divs?
URL changed to http://www.alternium.net/Bodie/index.php
Thanks for advice, though.
-Ars
Mar 16 '07 #3
drhowarddrfine
7,435 Expert 4TB
I don't know why the fix I gave you didn't work, it does for me.
Your h2 and h4 on this current page have margins that are causing the problem there. Just set their margins to zero.
Mar 16 '07 #4
That was It!
Thanks so much for pointing that out.
Kudos.
-Ars Moriendi
Mar 17 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Frances Del Rio | last post: by
5 posts views Thread by The Bicycling Guitarist | last post: by
1 post views Thread by Maurice Mertens | last post: by
2 posts views Thread by Dalan | last post: by
8 posts views Thread by Tinus | last post: by
7 posts views Thread by tm | last post: by
reply views Thread by Todd | last post: by
3 posts views Thread by Patient Guy | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.