Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Css text align

SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
Watch

Albino

Munky DesignsEstablished Member
Impact
17
ok, so basically im making a menu bar, and the text isnt in the center (vertically).

so I add padding, but this then pushes the cell below down 2. the css for the menu is:

Code:
#menu{
float:left;
width:100%;
height:100%;
margin:0px 6px 0px 6px;
list-style-type:none;
display:inline;
}
#menu a{
float:left;
background:#97494F;
color:FFFFFF;
font-family:"TradeGothic LH Extended";
font-size:8pt;
text-align:center;
width:92px;
height:100%;
text-decoration:none;
}
#menu a:hover{
background:#000000;
color:#FFFFFF;
font-family:"TradeGothic LH Extended";
font-size:8pt;
text-align:center;
width:92px;
height:100%;
text-decoration:none;
}

and attached are the images, showing what is going on. if you need more explaination, just say. Im guessing firefox is displaying it correctly, by adding an extra 2 pixels on, but im not how to get around it.

cheers to anyone who can help!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
you can try vertical-align: center; but I doubt it will work. Put padding on the top and bottom, and it should equal out and become centered.
 
0
•••
if I add padding to both sides, in ie it centres the text, and puts border on the rollover. in firefox, it does nothing lol.
 
0
•••
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back