473,472 Members | 2,241 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Assistance Requested: Margins refusing to disappear?

3 New Member
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 1586
drhowarddrfine
7,435 Recognized Expert Expert
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
alternium
3 New Member
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 Recognized Expert Expert
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
alternium
3 New Member
That was It!
Thanks so much for pointing that out.
Kudos.
-Ars Moriendi
Mar 17 '07 #5

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

Similar topics

9
by: Frances Del Rio | last post by:
when I test my stuff with the validator in HomeSite it tells me the body tag no longer reads margin attributes.. does this mean now margins are to be specified only in CSS? I work for an...
5
by: The Bicycling Guitarist | last post by:
Hello folks. I thought my home page was all fine and dandy, until I looked at it with Firefox in a smaller browser window. Instead of the central graphic dropping down below the text as in MSIE (a...
1
by: Maurice Mertens | last post by:
Hello, I'm trying to print a report to the printer but somehow it doesn't take the margins I set. I want the report to have a margin of 0.7 cm (397 twips), so in code I use the following: ...
2
by: Dalan | last post by:
I seemed to be having problems with structuring the use of NZ with a DSum expression. Having tried numerous variations of the expression without success, I'm asking for assistance. First some...
8
by: Tinus | last post by:
Hello all, Because you have been so helpfull the last couple of times, I thought after testing and wasting more than 20 pages (and google-ling for 3 days :-( ). I would ask you again for your...
7
by: tm | last post by:
I am trying to print a form using the following code, everything works fine but the margins are not acted upon. What I am I doing wrong? Private Sub CaptureScreen() Dim myGraphics As...
0
by: Todd | last post by:
Hi guys, Strange bug if someone could help. ... Im using printDialog, printDocument and printPreviewDialog to write my print routines for a graphics application. I want to allow the user to...
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
3
by: Patient Guy | last post by:
For a long time, this page has been up and an embarrassment. http://tinyurl.com/ylcqum In Firefox, the table moves out of its parent container with the negative margin, but not in MSIE6. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.