View Full Version : HTML/CSS Site navigation coding help!
Andrew2
August 24th, 2008, 02:44 PM
I'm seriously half dead today, I think I slept and squished my brain but I can't figure out what to do for the navigation.
This is my bg: http://i214.photobucket.com/albums/cc105/24168/dirt2/dirt2nav.gif
This is my divider (between each link): http://i214.photobucket.com/albums/cc105/24168/dirt2/dirt2divider.gif
This is my css.
.navigation {background:#dddddd url(http://i214.photobucket.com/albums/cc105/24168/dirt2/dirt2nav.gif) top left repeat-x;height:20px;width:950px;margin:0px 15px 0px 15px;}
But this is what is happening: http://dirt2.com/
This is what I want: http://i33.tinypic.com/333j329.gif
If anyone can help, I'd really appreciate it :(
capricieux
August 24th, 2008, 02:53 PM
IDK if this will work but what about adding line-height: 20px; in addition to the height: 20px;? =/
Andrew2
August 24th, 2008, 02:54 PM
Nope, I have line height for the navigation links already, I added it to the navigation though and it didn't change D:
CharmRoyal
August 24th, 2008, 02:55 PM
margin: 0px
Should the top have a number
Margins go top, right, bottom, left
I'd think it would fix but then again I have no idea :(
Andrew2
August 24th, 2008, 02:57 PM
No but thanks for trying :D
capricieux
August 24th, 2008, 02:59 PM
I think you could always make the top margin negative, like making it margin: -5px 15px 0px 15px; . When I can't get the positioning how I want it, I use negative numbers :P.
Andrew2
August 24th, 2008, 03:03 PM
:no: I don't want to do that, I shouldn't have to do that :(
CharmRoyal
August 24th, 2008, 03:07 PM
Well it would work......................... :gun_bandana:
Andrew2
August 24th, 2008, 03:10 PM
I think I'll take an hour and make tables and columns for it -_-
Negative margin is just kind of shaky, it's not really the best thing to do especially when you don't know the exact position of links.. Like in IE my navbar could look great so if I added negative margins then it would look messed up for some browsers unless I had an exact location or if I was directly knowing where the placements would be. Hard to be explain I guess :s
capricieux
August 24th, 2008, 03:23 PM
Oh. I tend to use negative margins and usually when done properly, it can show up correctly in any browser (well safari, firefox, and ie, since that's what I check 'em in). I'm pretty sure there's a way to resolve the issue w/o negative margins but I just find them easier :P. Good luck!
CharmRoyal
August 24th, 2008, 03:27 PM
Hm Idk but My sites coded that way with margins and it works in IE and FF, I check it
nsmchris
August 24th, 2008, 03:37 PM
you could cheat and just add a small height like 8px on your divider images. Its that image that is causing the problems.
CharmRoyal
August 24th, 2008, 03:39 PM
you could cheat and just add a small height like 8px on your divider images. Its that image that is causing the problems.
I thought it was that image lol Woohoo /smartie :devil2:
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.