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

Css text align

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
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!
 
Close
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.
 
Close
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.
 
Close
0
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back