Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9319727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:27:23+00:00 2026-06-19T03:27:23+00:00

I have structure like this <div class=’myClass’> <ul> <li> <a href=myfile.html>My link</a> </li> </ul>

  • 0

I have structure like this

  <div class='myClass'>
     <ul>
          <li>
               <a href="myfile.html">My link</a>
          </li>
     </ul>
  </div>

My li has a fixed with.
But a text is not always equal to li width
So the click able area is less than li.

I tried to fix it by increasing the width of the a but it is not working.

How can I achieve it.
I am using the following css

.tooltipinner ul {
   list-style-type: none;
   margin: 0;
   overflow-y: auto;
   padding: 0;
   width: 305px;
}
.tooltipinner ul li {
    background-color: #BBAEA5;
    background-image: url("../../Images/UIFiles/Menu/SubmenuBg.jpg");
    background-position: left top;
    background-repeat: repeat-x;
    border-top: 1px solid #C1BFBD;
    color: #FFFFFF;
    cursor: pointer;
    float: left;
    font-size: 12px;
    padding-bottom: 4px;
    padding-left: 5px;
    padding-top: 4px;
    width: 199px;
}
.tooltipinner ul li:hover {
    background-color: #BBAEA5;
    background-image: url("../../Images/UIFiles/Menu/SubmenuBgHover.jpg");
    background-position: left bottom;
    background-repeat: repeat-x;
    border-top: 1px solid #C1BFBD;
    cursor: pointer;
    float: left;
    padding-left: 5px;
}
.tooltipinner ul li a {
    color: #000000;
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
}
.tooltipinner ul li a:link {
    color: #000000;
    min-width: 200px;
    text-decoration: none;
}

I was also trying to put a div inside a but block element can not be placed inside a.
How can I fixed this.

Here is a fiddle
http://jsfiddle.net/qry45/2/
http://jsfiddle.net/qry45/4/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T03:27:25+00:00Added an answer on June 19, 2026 at 3:27 am

    I´m not sure but if you apply width:inherit; to all inner a, it works

    li {
        width: 400px;
        border: 1px solid red;
    }
    
    li a {
        position: relative;
        width: inherit;
        border: 1px solid green;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a HTML structure like this:- <article id=a_post class=a_post> <div id=thumbnail> <img id=shine
I have a html structure like this: <div class=one> <div id=two> <h2>Any</h2> <h4>Any</h4> </div>
I have the html structure like this <div class=selected> <div class=selectedOption>September 2012</div> </div> <div
let's say I have an HTML structure like this: <div class=first> <div class=sub-1> <div
I have a HTML structure like this: <div class=votes> <b>5</b> Votes <a id=vote-' +
I have a HTML structure like follows <div id=answer-1> <a class=edit></a> </div> <div id=answer-2>
Ok, I have a structure like this: <div class=image> <img src=img1.jpg alt= /> </div>
I have a html structure like this : <div id=nav_holder style=position:absolute;border-radius:400px;width:0px;height:0px;background-color:#460203;z-index:350px;> <div id=inner_wrap> </div>
I have structure like this <div id=mali_oglasi> <p class=mali_oglas> <span class=name>Predaja7</span> <span class=body>Lorem ipsum
I have html structure like below: <div id=banner-menu-holder> <div> <div class=avalible> <div class=items-holder> <div>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.