[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)
(multipurpose pic :D)
anyway, can anyone help?
RESOLVED:
need to put display:block; for the anchor to be displayed as a "block"
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)
(multipurpose pic :D)
anyway, can anyone help?
RESOLVED:
need to put display:block; for the anchor to be displayed as a "block"
Last edited:






