View Full Version : height attribute doesn't work for <a>

04-08-2009, 02:53 PM
I have created a horizontal menu using <ul><li><a> elements. below is a code snippet from it

<li><a href="#">Sub Item 1.1</a></li>
<li><a href="#">Sub Item 1.2</a></li>
<li><a href="#">Sub Item 1.3</a></li>
<li><a href="#">Sub Item 1.4</a></li>

everything goes fine but, I cant increase the height of <a> or <li> elements.
I want to put borders with <a> so that the it would fit all the way from top to bottom, but the height of <a> or <li> depends on it's font size only.

how to increase the size of these element as per our need?

04-08-2009, 02:59 PM
Make the a elements display:block; in your CSS.