Hi.
Is it possible to create a <li> with width and height properties?
I've tried, but with to no avail.
The structure of the XHTML is:
<ul id="menu">
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Lorem Ipsum</a></li>
</ul>
The CSS for #menu is:
position:relative;
top:0px;
left:0px;
The CSS for #menu li is:
position:relative;
top:0px;
left:0px;
display:inline;
list-style:none;
The CSS for #menu li a is:
width:100px;
height:25px;
background:url("../images/button.jpg");
Thanks in advance, Johnno.Inline elements can't have defined heights. However, block level elements can.
Perhaps:
<ul id="menu">
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Lorem Ipsum</a></li>
</ul>
And:
#menu {
margin:0;
padding:0;
list-style:none;
}
#menu li {
margin:0;
padding:0;
display:block;
width:100px;
height:25px;
}
#menu li a {
display:block;
width:100%;
height:100%;
background:url("../images/button.jpg");
}Worked perfectly, thanks .
Is it possible to create a <li> with width and height properties?
I've tried, but with to no avail.
The structure of the XHTML is:
<ul id="menu">
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Lorem Ipsum</a></li>
</ul>
The CSS for #menu is:
position:relative;
top:0px;
left:0px;
The CSS for #menu li is:
position:relative;
top:0px;
left:0px;
display:inline;
list-style:none;
The CSS for #menu li a is:
width:100px;
height:25px;
background:url("../images/button.jpg");
Thanks in advance, Johnno.Inline elements can't have defined heights. However, block level elements can.
Perhaps:
<ul id="menu">
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Lorem Ipsum</a></li>
</ul>
And:
#menu {
margin:0;
padding:0;
list-style:none;
}
#menu li {
margin:0;
padding:0;
display:block;
width:100px;
height:25px;
}
#menu li a {
display:block;
width:100%;
height:100%;
background:url("../images/button.jpg");
}Worked perfectly, thanks .