GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Quick CSS question (https://gfy.com/showthread.php?t=630634)

Young 07-07-2006 02:47 PM

Quick CSS question
 
My padding is affecting my hover background color in my lists. Where should I place the padding so that way the background color fills throughout?

What am I doing wrong?

Code:

#nav {
border: 1px solid #000000;
width:769px;
float:left;

}

#nav ul{
padding: 0;
margin:0;
float:left;
background-color: #FFFFFF;

}

#nav ul li{
display:block;
border: 3px solid #000000;
margin:0;
padding-right: 2px;
float:left
}

#nav ul li a{
color:#000000;
text-align:center;
text-decoration:none;
width: 9em;

}

#nav ul li a:hover{
background-color:#0099FF;
}

I realize my code maybe a little redundant but I don't go through and crunch everything till all is said and done.

any suggestions?

Young 07-07-2006 02:47 PM

also does someone wanna help me get rid of some of those "Floats"

All i'm trying to do is create a horizontal menu. Usually its a 2min job today for some reason its kicking my ass

Young 07-07-2006 02:52 PM

forget it...

im gonna go with classes

kirupai 07-07-2006 02:57 PM

Code:

#nav ul li{
display:block;
border: 3px solid #000000;
margin:0;
margin-right: 2px;
float:left
}

Try that :)

Young 07-07-2006 02:59 PM

Quote:

Originally Posted by kirupai
Code:

#nav ul li{
display:block;
border: 3px solid #000000;
margin:0;
padding-right: 2px;
float:left
}

Try that :)


appreciate it kirupai. i'll keep that in mind for next time. I decided to go with a class instead. :thumbsup

kirupai 07-07-2006 03:03 PM

Try it again i forgot to change the padding to margin lol

CyBå CüLt CRüE 07-07-2006 03:04 PM

Quote:

Originally Posted by kirupai
Code:

#nav ul li{
display:block;
border: 3px solid #000000;
margin:0;
margin-right: 2px;
float:left
}

Try that :)

That should work

kirupai 07-07-2006 03:08 PM

Code:

#nav ul li{
display:block;
border: 3px solid #000000;
margin: 0 2 0 0;
float:left
}

There you go even a little cleaner :P


All times are GMT -7. The time now is 05:30 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123