NameSilo

CSS: Width not being respected

SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
Watch

shuai

New Member
Impact
0
[resolved] CSS: width not being respected

Hello,
This may be another stupid question.
Same code:

a.menuitem {
background-color:#CCCCCC;
border-top:#999999 1px solid;
border-bottom:#999999 1px solid;
border-left:#999999 1px solid;
border-right:#999999 1px solid;
padding-left:2px;
font-size:10px;
width:190px;
text-decoration:none;
color:#000000;
}

this is nested in:
#menu {
margin:auto;
width:200px;
/* background-color:#3399CC; */
}

which is also nested in:

#leftbar {
width:200px;
background-color:#CCCCCC;
float:left;
background-image:url(../images/leftbg.PNG);
background-position:bottom;
background-repeat:no-repeat;
}

which is finally nested in:
#maincontainer {
margin:auto;
background-color:#CCCCCC;
width:900px;
}

Ok, I set the original instance (a.menuitem) to be width:190px, and it is margin:auto within the (div id) #menu. It's not doing what it's supposed to be doing (and here is the picture I took earlier)
noborder.PNG

(multipurpose pic :D)
anyway, can anyone help?

RESOLVED:
need to put display:block; for the anchor to be displayed as a "block"
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back