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 8320959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:50:58+00:00 2026-06-08T22:50:58+00:00

I have something like this : <div style=width:1300px> <ul class=ul-length ul-textalign> <li class=li-horizontal> A

  • 0

I have something like this :

<div style="width:1300px">
  <ul class="ul-length ul-textalign">
    <li class="li-horizontal"> A </li>
    <li class="li-horizontal"> B </li>
    <li class="fillgap"/>
  </ul>
</div>

I am trying to have the last li fill the rest of the line with some background. I would like to avoid a code specifying the width of the li fillgap depending on the length of previous lis. Thus, I wanted to have this last li in absolute positioning, and have it take the entire width of the ul :

.fillgap {
  position:absolute;
  width:1300px; /* for some reason, width:100% is longer than the div width... */
  z-index:0;
}

.ul-length {
  with:100%;
}

.ul-textalign {
  text-align:left; /* fix for IE, prevents the absolute li from beginning at the center */
}

.li-horizontal {
   float:left;
}

The easiest way to have a background on the entire width is probably to set the background of the ul, but I cannot do this because it won’t fit the design intended. I need to be able to do this with the lis. And my above code results in a problem in IE : the li fillgap seems to be kept in the page flow because it is put next to the previous lis, instead of being at the beginning of the ul…

Any idea?

Here is the result expected (in opera) :
enter image description here

Here is the result in IE :
enter image description here

  • 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-08T22:50:59+00:00Added an answer on June 8, 2026 at 10:50 pm

    Add position: relative to .ul-length. That makes the position: absolute on the li relative to .ul-length.

    That lets you change the width from 1300px to 100%;

    Here’s a fiddle: http://jsfiddle.net/joplomacedo/5vykm/

    Still, I’m not quite sure why you need to add position: absoluteto the li at all. If you want it to stay exactly where it is why position: absolute it?

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

Sidebar

Related Questions

I have something like this currently: <div class = className style = position: absolute;
So basically I have something like this <div class=iframe-holder> <span></span> <iframe src=iframe.html width=200 height=200
I have 3 columns that look something like this: <div style=width:900px;margin:0 auto id=container> <div
i have my html something like this... <div class = content> <div class =
I have something like that: <div style=width:100px;float:left>menu</div> <div style=float:left>content</div> both floats are neccesary. I
atm I have something like this: $('#fish').append(<div data-bind='foreach: rows'> + <div ... + <p>...</p>..);
I want to parse a html content that have something like this: <div id=sometext>Lorem<br>
I have a div tag which looks something like this: <div id=some id here
I usually have my structure laid out something like this: <div id=all> <div id=page>
I want to have 3 divs aligned inside a container div, something like this:

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.