Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

margin gap 1

Status
Not open for further replies.

Cullen411

Programmer
Aug 17, 2005
89
GB
There's a larger gap between the navlinks div and the subsequent div, how can I adjust the gap?


CSS

#navlinks ul {list-style-type:none;margin-left:3px;padding:0;margin-top:0;margin-bottom:0;}


HTML

<div id="navlinks">
<ul>
<li><a href="/default.asp">test</a></li>
<li><a href="/default.asp">test</a></li>
<li><a href="/default.asp">test</a></li>
<li><a href="/default.asp">test</a></li>
</ul>
</div>

<div style="width:126px;margin:0 auto;text-align:center;">
......................blah blah
</div>

thanks.
 
Haven't I already done that?

#navlinks ul {list-style-type:none;margin-left:3px;padding:0;margin-top:0;margin-bottom:0;}
or am I missing something/

thanks.
 
you're right. but then again, when i copied and pasted just the code you provided into a new html document, it worked as expected, with no significant gaps.

we'd need to see the rest of your stylesheet to properly determine the problem.



*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
I think it might be something to do with me breaking up the code into separate asp include files.


here's the stylesheet code
body { margin: 0; padding: 0; background-color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000;}
table, td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000;}
.datetext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #808080;text-align:right;}

a:link{ font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: underline; color: #0000FF; font-size: 11px;}
a:hover { font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: underline; color: #FF6600; font-size: 11px;}
a:active { font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: underline; color: #0000FF; font-size: 11px;}
a:visited { font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: underline; color: #0000FF; font-size: 11px;}

a:link.nav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #FFFFFF; text-decoration: none;}
a:hover.nav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #FFFFFF; text-decoration: none;}
a:active.nav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #FFFFFF; text-decoration: none;}
a:visited.nav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #FFFFFF; text-decoration: none;}

a:link.sclinks { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: normal; color: navy; text-decoration: none;}
a:hover.sclinks { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: normal; color: navy; text-decoration: none;}
a:active.sclinks { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: normal; color: navy; text-decoration: none;}
a:visited.sclinks { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: normal; color: navy; text-decoration: none;}

.dropdownBox
{
border-right: #CCCCCC 1px inset;
border-top: #CCCCCC 1px inset;
border-left: #CCCCCC 1px inset;
border-bottom: #CCCCCC 1px inset;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #000000;
margin:0;
}

h1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #000000; }
h2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #000000; }
h3 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #FF6600; }
h4 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #000000; padding:0; margin:0; text-align:center;}
.small { font-family: Verdana, Arial, Helvetica, sans-serif; color: navy; font-weight: bold; font-size: 11px; text-decoration:underline;}
.center { text-align: center; }
.comment { color: #009933; }
.code { color: #0000CC; border:1px solid #CCCCCC; background-color:#f7f7f7; padding:3px 3px 3px 3px; }
div#contentborder { border:1px solid #CCCCCC; background-color:#f7f7f7; padding:2px 2px 2px 2px;}
div#content { border:0; vertical-align:top; padding:0px 0px 0px 0px; margin:0;}

p.smalltext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px;}

input, textarea, submit { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; }
#navlinks ul {list-style-type:none;margin-left:3px;padding:0;margin-top:0;margin-bottom:0;}
 
I feel whatever is your problem it is actually originating from the ...blah blah.. part you did not share with us. Also, your css is a mess to say the least. Pseudo classes should be the last, so [tt]a.nav:link[/tt] and not the other way around.
 
Is this a firefox issue and if so is the issue the horizontal gap? I notice in firefox the subsequent div is centered because of auto length padding.

 
No it's the vertial gap between the last link "LinksPro Reciprocal" and the 3 button images that appear on the left hand side.
 
Hi cLFlaVA,
got so wrapped up in that that I overlooked the obvious. I use alot of include files and overlooked one.

thanks guys.
 
Vragabond, I made the changes you suggested to the stylesheet. Is there anything else you would change in the stylesheet?

thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top