Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2008
    Posts
    116
    Thanks
    2
    Thanked 0 Times in 0 Posts

    height attribute doesn't work for <a>

    I have created a horizontal menu using <ul><li><a> elements. below is a code snippet from it

    Code:
       <ul>
             <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>
       </ul>
    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?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Make the a elements display:block; in your CSS.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •