• Login
  • Register
  • Account
  • About 'corePHP'
  • Portfolio
  • SiteMap
  • Careers

Joomla! Development, Professional Joomla! Templates, Components, Extensions and Plugins — 'corePHP'

Professional website development and design services

  • Home
  • Joomla! Products
    • Components
      • Community ACL
      • Droomla
      • Fav
      • jomCalendar
      • JPhoto
      • Mortgage Calculators
      • WordPress
    • Plugins
      • Amazon Pack
      • Automated CSS3 Generator
      • Chimp Your Joomla!
      • jomCDN
      • jomDefender
      • VirtueMart Age Restriction Plugin
    • JPhoto Add-ons
      • JPhoto Slideshow
    • cACL Add-ons
      • DOCman Plugin
    • CB Plugins
      • DOCman Downloads
    • Modules
      • YouTube Module
  • Services
    • Joomla Services
      • Joomla! Development
      • Joomla! Design
      • Joomla! Install and Upgrade
    • WordPress Services
      • Wordpress Development
      • Wordpress Design
      • Wordpress Install and Upgrade
    • Drupal Services
      • Drupal Development
      • Drupal Design
      • Drupal Installations
  • Resources
    • Accessibility Report
    • Affiliate Club
    • Search Engine Submissions
    • 'corePHP' Partners
  • Blog
  • Support
    • Submit Ticket
    • Community Forums
  • Contact Us

Search the Blog

Categories

  • 'corePHP'
  • 'corePHP' Products
  • Accessibility
  • Dreamweaver
  • Expos
  • Flash
  • Graphics
  • Javascript
  • Joomla
  • Marketing
  • Mobile
  • MySQL
  • Operating System
  • Other
  • PHP
  • Print
  • Public News Articles
  • Recommended Software
  • security
  • SEO
  • Templates
  • Tools
  • Uncategorized
  • WordPress
  • XHTML+CSS

Pages

  • Chicago ’09
  • Denver Expo / Fun

Archives

Tag Cloud

'corePHP' Android app Battle Creek blogging bugs Christmas CMS Expo Community Acl css discount fix html ie ie6 iOS jomCDN jomMobile jomsocial Joomla Joomla! 1.5 Joomla! 1.6 Joomla Chicago joomla extensions joomla products joomla sale JPhoto marketing mobile new products new release PHP plugins products sale security small business snippets Steven Pignataro template tips updates WordPress WordPress MU youtube

'corePHP' Blog


Keep up to date on what's happening at 'corePHP'

« Joomla! resources for beginners and advanced users
Fix the sIFR bug when logged in (UPDATED!) »

Perfect absolute positioning in IE6

Ever try to give a div an absolute position in IE6 and find out it’s not doing anything your CSS is telling it to do? I found out why!

Yesterday I was working on a really advanced CSS layout for a client and there were 2 elements that needed to be absolute positioned. I did it as usual, expecting the outcome to be what it should be, except IE6 was positioning it in the bottom left instead of bottom right and without any of the layout I had on the div! I spent 3 hours trying different things just to have it presentable for a meeting, but I still didn’t have an answer to my dilemma. Last night I spent another 2 hours on this and finally came up with an answer. For whatever reason, IE6 needs the div to be nested into another div. Only then can you absolute position the inner div… sometimes! If I moved my div to some parts of the xhtml it worked as intended, but in certain places it was inheriting something from a div around it (NOT inside it). I couldn’t find any reasonable explanation for why it worked in some areas and not others, but I did realize that whatever it was, the outer div absorbed it and allowed the inner div to be positioned correctly. In a perfect world you can wrap things in one div, but the existence of IE means this is not a perfect world. When in doubt‚ wrap it!

This entry was posted on Saturday, February 9th, 2008 at 7:49 pm by jshroyer and is filed under Templates, XHTML+CSS. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

6 Responses to “Perfect absolute positioning in IE6”

  1. Mckenzie says:
    June 2, 2009 at 8:27 am

    thanks you just saved me 3 hours!

  2. Antoine says:
    July 22, 2009 at 7:17 am

    I think it’s because of the different floating elements in the page you have.

    A simpler solution is to add clear:both, or left/right to your absolutely positioned element

    Cheers

  3. Chris says:
    September 17, 2009 at 5:51 pm

    Brilliant! Thank you!

  4. rmm says:
    September 27, 2010 at 12:28 pm

    I recall my mother giving me that last line as advice once…

    Thanks, this article saved me many hours of cursing at my screen.

  5. excentricus says:
    January 31, 2011 at 5:39 pm

    Wish I’ve found your site earlier — this crap was bugging the hell out of me. Thanks!

  6. Gate says:
    May 19, 2011 at 9:53 am

    Seriously, i’ve just spent more than 2 hours on the problem, and impossible to find a solution.
    Thanks to you, my website is compatible IE6.

    Thanks a lot !

    Sorry for my english, i’m french …

Leave a Reply

Click here to cancel reply.

User Information

Message


'corePHP' Blog is proudly powered by WordPress. Joomla! extensions by 'corePHP'
Entries (RSS) and Comments (RSS).

'corePHP' at a Glance

Policy Statement

  • Terms of Service
  • Refund Policy
  • Cancel Subscription

Contact Us

(269) 979-5582
62 East Michigan Ave.
Suite 202
Battle Creek, MI 49017

Join Our Mailing List

Get $100 off a 3-Day registration at
CMS Expo 2013! Sponsored by
corePHP! Just use the code:
CMSX61727 when you register!

©2012 'corePHP' All Rights Reserved – Designed by 'corePHP'

  • Twitter
  • Find us on Google+
  • Digg It
  • Facebook
  • LinkedIN
  • RSS