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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:28:01+00:00 2026-05-25T01:28:01+00:00

I’m trying to build a <ul> with two links inside each <li> . The

  • 0

I’m trying to build a <ul> with two links inside each <li>. The second link inside each <li> should be vertically aligned, and it should work in Firefox and Internet Explorer 7. The problem is, when I add a float, IE7 automatically expands the <ul> to 100% of the page rather than allowing the width to be automatic (or flexible). The code below works in FF, but not IE7. Any ideas?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org
/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
div.menu-block {
            position:absolute; /*this gives the menu a flexible width in FF, 
preventing the <ul> from expanding to 100%*/
}
ul {
            list-style:none;
            width:auto; /* allows for flexible lengths on the first link in the li*/
}
a.leftlink {
            background:#CC9900;
            float:left;
}
a.rightlink {
            background:#006699;
            float:right;
            width:50px; /*fixed width for the "more" link*/
}
</style>
</head>
<body>
<div class="menu-block">
  <ul>
    <li>  <a href="#" class="leftlink">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.</a> <a href="#" class="rightlink">More</a></li>
    <li>  <a href="#" class="leftlink">bbbbbbbbbb.</a> <a href="#" class="rightlink">More</a></li>
  </ul>
</div>
</body>
</html>

Any help at all would be greatly appreciated!! Thanks, here are some visual examples:

Example image from Firefox with the desired output: http://tinypic.com/view.php?pic=1564lte&s=7

Example image from IE7 with the broken layout: http://tinypic.com/view.php?pic=2h5oabk&s=7

  • 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-25T01:28:01+00:00Added an answer on May 25, 2026 at 1:28 am

    Found the answer for anyone who needs this in the future!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    div.menu-block {
                position:absolute; /*this gives the menu a flexible width in FF, preventing the <ul> from expanding to 100%*/
    }
    ul {
                list-style:none;
                width:auto; /* allows for flexible lengths*/
    }
    li{ position:relative; width:auto;}
    a.leftlink {
               background:#CC9900;
               margin-right: 50px;
    }
    a.rightlink {
                background:#006699;
                position:absolute;
                top: 0;
                right:0; /*key piece I was missing before*/
                width:50px; /*fixed width for the "more" link*/
                text-align:right;
    }
    </style>
    </head>
    <body>
    <div class="menu-block">
      <ul>
        <li>  <a href="#" class="leftlink">aaaaaaaaa.</a> <a href="#" class="rightlink">More</a></li>
        <li>  <a href="#" class="leftlink">bbbbbbbbbbbbbbbbbbbbbbb.</a> <a href="#" class="rightlink">More</a></li>
      </ul>
    </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I'm having trouble keeping the paragraph square between the quote marks. In firefox the

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.