Is it possible to set the width of an inline element in CSS? For example, the navbar on http://www.w3bids.com uses...
But, it doesn't actually set the width of each link to 100px for some reason. Now, if I did this with only changing "display" to "block" instead of inline, it would give me the width... but the buttons would be stacked which I obviously don't want. So, is it possible to set the "width" of an inline element using CSS?
For example, on http://www.txstart.com I used...
And it gives me set "button" widths. Is it because I have a "border-style" in the code as well?
Code:
a.navbar {
display:inline;
text-decoration:none;
text-align:center;
font-size: 12px;
background-image:
url('http://www.w3bids.com/templates/SmoothBlue/images/site/nav/buttons/button_off.gif');
height:75px
width:100px;
border-style:none;
padding:3px;
margin-left: 0px;
margin-right: 0px;
}
But, it doesn't actually set the width of each link to 100px for some reason. Now, if I did this with only changing "display" to "block" instead of inline, it would give me the width... but the buttons would be stacked which I obviously don't want. So, is it possible to set the "width" of an inline element using CSS?
For example, on http://www.txstart.com I used...
Code:
a.startmenu {
display:block;
text-decoration:none;
text-align:left;
background-color: #FFFBFF;
width:150px;
border-style:outset;
padding:3px;
margin-left: 0px;
margin-right: 0px;
}
And it gives me set "button" widths. Is it because I have a "border-style" in the code as well?













