Previous Message
Next Message

RE: [css-d] what am I missing here?

Sent by RUST Randal on 30 January 2002 10:10

I have actually a *halfway* solution with the following code.  HOWEVER, you
can't get the four elements to be the same width, because you cannot apply a
"width" to the "a" element unless the display has been set to "block."  At
least I haven't found a way...yet:)  But if you play around with this code,
like say adding an image that is 1/4 the width of the <div>, then you might
stumble across a solution.

	#mainMenu {
		width: 400px;
		color: white;
		background-color: red;
		text-align: center; }

	#mainMenu a {
		width: 100px;
		color: white;
		border-right: 1px solid black;
		text-decoration: none; }
	#mainMenu a:hover {
		text-decoration: underline; }


<div id="mainMenu"> 
	<a href="#" style="border-left: 1px solid black;">&nbsp;&nbsp;Item
	<a href="#">&nbsp;&nbsp;Item 2&nbsp;&nbsp;</a> 
	<a href="#">&nbsp;&nbsp;Item 3&nbsp;&nbsp;</a> 
	<a href="#">&nbsp;&nbsp;Item 4&nbsp;&nbsp;</a>  

Previous Message
Next Message

Possibly related: