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

  • SEARCH
  • Home
  • 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 5931655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:43:31+00:00 2026-05-22T14:43:31+00:00

I have list elements like this: <div class=outer> <div>Head</div> <div>Content</div> </div> what i want

  • 0

I have list elements like this:

<div class="outer">
    <div>Head</div>
    <div>Content</div>
</div>

what i want to have is a link over the whole outer div like if you wrap it with (But unfortunately that ist not valid)

I know that it is possible to use “display:block” for an “a” Tag inside a div to get it to the full size of the div, but unfortunately the size of the divs depend on the (dynamic) content and therefore is not set via css. This means that if I set width and height for said “a” Tag to 100%, then it will take the size of the parent of the outer div.

Is there a valid solution to this?

  • 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-05-22T14:43:32+00:00Added an answer on May 22, 2026 at 2:43 pm

    the following might work:

    <div class="outer">
        <a href="" class="spec_link"></a>
        <div>Head</div>
        <div>Content</div>
    </div>
    

    and the css:

    .outer{ position:relative;}
    
    .outer .spec_link{
    display:block;
    position:absolute;
    top:0;
    left:0;
    bottom:0;
    right:0;
    }
    

    the link will wrap itself around the outer no matter it’s size. I do something similar for blocks with transparency

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few list elements, like this: <li class=item> <a class=toggle><h4>ämne<small>2010-04-17 kl 12:54
I have a list like this: <html> <head> <link type=text/css rel=stylesheet href=testli.css> </head> <body>
I have a UL html list that looks like this: <div id=scroller> <ul> <li>item
I have a template like this: <script id=notesTemplate type=text/html> <li class=Note> <div class=NoteDate data-bind=style:
Hey guys, I have a UL like so: <ul id=list> <li class=something> <div class=btns
I have a div structure like this [simple menu]: <div class=float menuA> <div class=float
I have a list of lists that looks like this: x[[state]][[year]] . Each element
I have a list of elements which I would like to make sortable and
I have a list comprehension operating on elements of an .NET array like obj.arr
I have a list of elements that I want to split into individual lists

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.