473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

1px gap between divs in IE for win

Hi everyone.
This is my first attempt with CSS and I've run into a little problem
when it's viewed in IE 6 for Windows. It looks fine in Firefox, Safari,
Opera, and IE on the mac.
I've read through tons of postings and tried everything I can think of,
but I just can't seem to get rid of this small gap between my
div#header and div#topnav.
I'd love any suggestions. I'm eager to learn so if you have any other
suggestions about my style sheet please let me know.
Thanks!
Ariel

page is here:
http://www.stickersisters.com/newsite/index4.htm

full css is here:
http://www.stickersisters.com/newsit...ersisters4.css

here's the section I'm having the problem with:

<div id="mainwrap">
<div id="header"><img src="images_content/penbanner4.gif" alt="Sticker
Sisters" width="774" border="0"/>
</div> <!-- end header "banner"-->
<div id="topnav">
<div id="topnavcontainer">
<ul>
<li> <a href="">home</a></li>
<li> <a href="">shop</a></li>
<li> <a href="">about</a></li>
<li> <a href="">blog</a></li>
<li> <a href="">activism</a></li>
<li> <a href="">links</a></li>
</ul>
</div><!--end top nav container-->
</div> <!-- end top nav-->

-------------------------------------------------------------------------------
here's the css for that section:

body {margin:0px; padding:0px; font: 1.0em arial, verdana, sans-serif;
text-align:center;background-color:#330033;}
* {margin:0; padding:0; }

div#mainwrap {width:774px; margin-left:auto; margin-right:auto;
margin-top:0; text-align:left;}
div#header {width:774px; height:103px; margin:6px 0 0 0;
background-color:#330033; text-align:center; }
div#topnav {width:774px; height:36px; background-color:#CCCCFF;
text-align:center; margin:0; padding-top: 8px;}
div#topnavcontainer ul{list-style-type:none; margin:0; padding:0;
text-align:center; }
div#topnavcontainer ul li {display: inline; font-size: 1em;
font-weight:bold; }
div#topnavcontainer ul li a{text-decoration:none; padding:.2em 1em;
color: #330033;}
div#topnavcontainer ul li a:hover{color:#003333;}

Nov 7 '05 #1
5 5513
ar*******@hotmail.com wrote:
I just can't seem to get rid of this small gap between my page is here:
http://www.stickersisters.com/newsite/index4.htm full css is here:
http://www.stickersisters.com/newsit...ersisters4.css <div id="mainwrap">
<div id="header"><img src="images_content/penbanner4.gif" alt="Sticker
Sisters" width="774" border="0"/>
</div> <!-- end header "banner"-->


It's the same old problem as occurs with images in tables. Get rid of
the linebreak (in the code) after the image.
<div><img></div>
Making the image 'display: block' should also work.

twaddle

Nov 7 '05 #2
ar*******@hotmail.com wrote:
but I just can't seem to get rid of this small gap between my
div#header and div#topnav.


img{vertical-align:text-bottom}

--
Spartanicus
Nov 7 '05 #3
that was simple! got rid of the linebreak after the image and it works
perfectly. thanks so much.

Nov 7 '05 #4
ar*******@hotmail.com wrote:
Hi everyone.
This is my first attempt with CSS and I've run into a little problem
when it's viewed in IE 6 for Windows. It looks fine in Firefox, Safari,
Opera, and IE on the mac.
I've read through tons of postings and tried everything I can think of,
but I just can't seem to get rid of this small gap between my
div#header and div#topnav.
I'd love any suggestions. I'm eager to learn so if you have any other
suggestions about my style sheet please let me know.
Thanks!
Ariel

page is here:
http://www.stickersisters.com/newsite/index4.htm File Not Found
The requested URL was not found on this server.
full css is here:
http://www.stickersisters.com/newsit...ersisters4.css

here's the section I'm having the problem with:

<div id="mainwrap">
<div id="header"><img src="images_content/penbanner4.gif" alt="Sticker
Sisters" width="774" border="0"/>
</div> <!-- end header "banner"-->
<div id="topnav">
<div id="topnavcontainer">
<ul>
<li> <a href="">home</a></li>
<li> <a href="">shop</a></li>
<li> <a href="">about</a></li>
<li> <a href="">blog</a></li>
<li> <a href="">activism</a></li>
<li> <a href="">links</a></li>
</ul>
</div><!--end top nav container-->
</div> <!-- end top nav-->

-------------------------------------------------------------------------------
here's the css for that section:

body {margin:0px; padding:0px; font: 1.0em arial, verdana, sans-serif;
text-align:center;background-color:#330033;}
* {margin:0; padding:0; }

div#mainwrap {width:774px; margin-left:auto; margin-right:auto;
margin-top:0; text-align:left;}
div#header {width:774px; height:103px; margin:6px 0 0 0;
background-color:#330033; text-align:center; }
div#topnav {width:774px; height:36px; background-color:#CCCCFF;
text-align:center; margin:0; padding-top: 8px;}
div#topnavcontainer ul{list-style-type:none; margin:0; padding:0;
text-align:center; }
div#topnavcontainer ul li {display: inline; font-size: 1em;
font-weight:bold; }
div#topnavcontainer ul li a{text-decoration:none; padding:.2em 1em;
color: #330033;}
div#topnavcontainer ul li a:hover{color:#003333;}

Nov 27 '05 #5
meltedown wrote:
ar*******@hotmail.com wrote:
Hi everyone.
This is my first attempt with CSS and I've run into a little problem
when it's viewed in IE 6 for Windows. It looks fine in Firefox, Safari,
Opera, and IE on the mac.
I've read through tons of postings and tried everything I can think of,
but I just can't seem to get rid of this small gap between my
div#header and div#topnav.
I'd love any suggestions. I'm eager to learn so if you have any other
suggestions about my style sheet please let me know.
Thanks!
Ariel

page is here:
http://www.stickersisters.com/newsite/index4.htm


File Not Found
The requested URL was not found on this server.

oops. I thought I was responding to a new post, but its from 3 weeks ago
and has already been answered. my mistake.
Nov 27 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Egon Pasztor | last post by:
Hi. I'm new at CSS, so maybe this is obvious, but I've looked around quite a bit looking for a solution. I'm playing with the vertical positioning of elements in a 2-column layout. The...
2
by: David Winter | last post by:
This is a totally trivial CSS problem, I'm sure, but I don't get it. I want a centered DIV with a fixed width between two other DIVs that should fill the rest of the window/viewport (= 100%). How...
12
by: deko | last post by:
Is there any way to work around the blank space created by hidden divs? I'm trying to use a relatively postioned divs with show/hide behaviors to annotate an image. The divs show/hide...
15
by: red | last post by:
How do I center two side by side divs ? I've been writing css pages for a while but there's one thing tha still eludes me. I can center a div with margin auto. I can place two divs side by side...
3
by: Marc | last post by:
Hi to all, I have several DIVs in a page, each has a unique name. I'd need a method to cycle through all DIVs so that I can change their style. For example, let's say I need to set a red...
39
by: WindAndWaves | last post by:
Hi Gurus I have a page, which looks a bit like this: .... <body> <div ID=id1>................</DIV> <div ID=gsd>................</DIV> <div ID=ewd>................</DIV> <div...
12
by: meltedown | last post by:
I would like the floating divs to float and then the header to come after them , on the left. That's what I thought clearing the floats was for, but in this example, the header is to the right of...
2
by: tasman.hayes | last post by:
I'm experimenting with converting a site from a table layout to CSS. I'm floating three DIVs in a row for the top of a website (a logo, navigation buttons and a email list signup box). The DIVs...
2
by: sicapitan | last post by:
Hi There :) Is it possible to get the 4 corners where 2 dives intersect? I'm making a table-ish system and som drag and drop elements need to snap to the area intersecting between 2 divs. I...
11
by: dusk | last post by:
Hi, I'm very new to javascript, and I'm having trouble finding a way to display a string of divs without the code getting really messy. I have several different pages to write, each with about...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.