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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:23:06+00:00 2026-05-28T06:23:06+00:00

I’d like to apply absolute position inside the a div that’s floated to the

  • 0

I’d like to apply absolute position inside the a div that’s floated to the right.

Here’s my HTML

<div>
   <div id="membership">
       <span><a href="#">Login</a></span>
       <span><a href="#">Join Us</a></span>
   </div>
</div>

and this is my CSS

#membership
{
  float:right;
  text-align:right;
}

I’m using “SUPERPREVIEW” to compare the rendering of the page on different browsers. They are always a difference in terme of position in termes of elements.

To apply absolute position to an element, its parent needs to have at list the property position set to relative. Given that for thos 2 spans, their parent is rather floated, how to apply absolute positionning?

In IE6, IE7, IE8, for instance, there’s laways a extra pixel that is added on top of those 2 spans campare to FF3.6.1.6 and IE9.

Thanks for helping.

  • 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-28T06:23:06+00:00Added an answer on May 28, 2026 at 6:23 am

    Whether or not a parent is floated has nothing to do with the absolute positioning of its child. If you apply absolute positioning to those child spans supposing the following:

    #membership span {position: absolute; top: 0; left: 0}
    

    they will be positioned relative to the next parent with relative positioning. If no parent has relative positioning, it will be positioned relative to the body.

    What absolute positioning does is places elements at a specific X and Y coordinate (relative to the closest parent with position: relative). Those ‘absolute’ elements will maintain their positioning regardless of additional sibling elements, (floated, block, inline, or otherwise) before or after those ‘absolute’ elements. An additional side effect of absolute positioning is that the height of the parent element will be uneffected by the height or position of those ‘absolute’ elements, so if those elements are the only children of that #membership div, it must have a declared height and width in order to take up real space in your layout.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has

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.