2 replies [Last post]
jemes
Offline
Regular
Last seen: 8 years 45 weeks ago
Joined: 2005-11-10
Posts: 26
Points: 2

If you take at the link below I'm having trouble with the top menu.

http://departments.brooklands.ac.uk/ifp/test/

I'm trying to use background images as buttons with normal xhtml text links.

But I can't seem to get the text in the middle of the buttons.

I think I may be going about this in the wrong way, so if anyone could take a look that would be great.

Thanks

Jemes

#topbar{
padding-top:18px;
border: 0px solid #000000;
background-image:url(../images/top.gif);
background-repeat:no-repeat;
height:120px;
margin-left:16px;
}

#topmenu{
margin:32px 0px 0px 30px;
font-size: 10pt;
font-weight:bold;
height:30px;
}

#topmenu ul{
margin:0px;
padding:0px;
list-style-type: none;
}

#topmenu ul li{
padding-right:4px;
}

.home{
float:left;
display:inline;
background-image: url(../images/home.gif);
background-repeat: no-repeat;
height:33px;
width:45px;
}

.active{
float:left;
display:inline;
background-image: url(../images/top_active.gif);
background-repeat: no-repeat;
height:33px;
width:106px;
}

.norm{
float:left;
display:inline;
background-image: url(../images/top_norm.gif);
background-repeat: no-repeat;
height:33px;
width:106px;
}

#topmenu li a{
text-decoration: none;
color: #AC5BA0;
padding-right: 0.7em;
height:30px;
}

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 37 weeks 1 day ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Looks alright to me? The

Looks alright to me?

The easiest way I know to do it is to give the list-items and anchors the same fixed height, then set the line-height equal to the height of the anchors.

Verschwindende wrote:
  • CSS doesn't make pies

jemes
Offline
Regular
Last seen: 8 years 45 weeks ago
Joined: 2005-11-10
Posts: 26
Points: 2

Yep that's it, thanks. Jemes

Yep that's it, thanks.

Jemes