Shoutbox

some css help - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: some css help (/showthread.php?tid=54082)

some css help by Supersonicdarky on 12-20-2005 at 02:45 AM

code:
#menu a{
    width: 50px;
    height: 15px;
    display: block;
    background: #011F9E;
    color: white;
}
#menu a:hover{
    width: 47px;
    height: 15px;
    display: block;
    background: #E1E1FF;
    border-left: 3px solid #011F9E;
    color: white;
}

this makes what i want, but every link is on a new line. how do i make it horisonal?

now:

<-->
<-->
<-->
<-->

i want:

<--><--><--><-->

(<--> is a link)
RE: some css help by Eljay on 12-20-2005 at 08:47 AM

remove "display:block;"


RE: some css help by Supersonicdarky on 12-20-2005 at 12:01 PM

but then it ignores the width and the height and it becomes the size of the text inside :(


RE: some css help by Eljay on 12-20-2005 at 12:04 PM

display:inline-block; ? not sure if itll work *-)


RE: some css help by Supersonicdarky on 12-20-2005 at 12:06 PM

nope, no difference


RE: some css help by Plik on 12-20-2005 at 12:32 PM

code:
#menu a{
    width: 50px;
    height: 15px;
    display: block;
    background: #011F9E;
    color: white;
    float: left;
}
#menu a:hover{
    background: #E1E1FF;
    border-left: 3px solid #011F9E;
}

In bold is the bit you need to add to make them all on one line, and i also deleted the stuff you dont need in the :hover statement because it should be inherited from the previous bit.
RE: some css help by Supersonicdarky on 12-20-2005 at 12:51 PM

thnx! Worked! :D