+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: CSS: Absolute Positioning Challenge

  1. #1
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    4,838

    Default CSS: Absolute Positioning Challenge

    I've put together this page. What I'm trying to do is use "Absolute Positioning" for the "Header" and "Navlist" DIVs.

    Here are the two (2) challenges I am currently encoutering:
    1. The "navlist" background appears offset in Mozilla but not IE.
    2. I would like the "header"DIV to be horizontally centered so that the page looks ok regarless of screen resolution settings [800x600, 1024x768, etc.]
    Can anyone show the way?
    Last edited by ResaleBroker; 01-26-2006 at 04:51 PM. Reason: Replaced URL with current page.
    Used Mobile Homes For Sale
    Used Manufactured Homes For Sale
    SalesPractice.com -The Definitive Source for Sales Education on the Internet. - Sales Training

  2. #2
    Join Date
    Oct 2004
    Location
    Florida
    Posts
    2,132

    Default Re: CSS: Absolute Positioning Challenge

    I was having the same problem. Damn internet explorer is the real problem. I think if you ad the code below to your .css you should be alright. Do a search for "diplay: block" in Google for an explaination of what that code does. You may see some unexpected white spaces in IE after you ad the code. Check out my blog for a solution I found, or do a search for "white spaces in IE" for a couple of more complex solutions.
    Code:
    }
    .clearfix:after {
        content: "."; 
        display: block; 
        height: 0; 
        clear: both; 
        visibility: hidden;
    }
    .clearfix {display: inline-table;}
    
    /* Hides from IE-mac \*/
    * html .clearfix {height: 1%;}
    .clearfix {display: block;}
    /* End hide from IE-mac */
    This code does make your .css w3c non-complient. Hope that helps.

  3. #3
    Join Date
    Oct 2004
    Location
    Florida
    Posts
    2,132

    Default Re: CSS: Absolute Positioning Challenge

    I didn't check your page in IE until now and see that you are having problems in IE as well. I don't know if my code will help. I'll try messing around with it and see what happens.

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    4,838

    Default Re: CSS: Absolute Positioning Challenge

    I'm working on it right now so it might look a little ugly.
    Used Mobile Homes For Sale
    Used Manufactured Homes For Sale
    SalesPractice.com -The Definitive Source for Sales Education on the Internet. - Sales Training

  5. #5
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    4,838

    Default Re: CSS: Absolute Positioning Challenge

    Kyle, I believe I've installed the code properly that you posted. Unfortunately, I'm still experiencing the same problem.

    Any ideas?
    Used Mobile Homes For Sale
    Used Manufactured Homes For Sale
    SalesPractice.com -The Definitive Source for Sales Education on the Internet. - Sales Training

  6. #6
    Join Date
    Oct 2004
    Location
    Florida
    Posts
    2,132

    Default Re: CSS: Absolute Positioning Challenge

    Yeah I'm looking at it right now. Let me try to mess with it now. I'm going to throw it up on my server and mess with it.
    Kyle

  7. #7
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    4,838

    Default Re: CSS: Absolute Positioning Challenge

    Thanks Kyle!
    Used Mobile Homes For Sale
    Used Manufactured Homes For Sale
    SalesPractice.com -The Definitive Source for Sales Education on the Internet. - Sales Training

  8. #8
    Join Date
    Oct 2004
    Location
    Florida
    Posts
    2,132

    Default Re: CSS: Absolute Positioning Challenge

    I can't figure out. Why not use just use a container instead of absolute positioning?

  9. #9
    Join Date
    Sep 2004
    Location
    Czech Republic
    Posts
    159

    Default Re: CSS: Absolute Positioning Challenge

    Jeffrey,

    The "navlist" background appears offset in Mozilla but not IE.
    I do not understand clear this point...

    I would like the "header"DIV to be horizontally centered so that the page looks ok regarless of screen resolution settings [800x600, 1024x768, etc.] Can anyone show the way?
    ... but in my opinion this point is not possible due to position:absolute; Let me explain:

    you can cover header with another <div> which will be set to some width and with attribute margin:auto; you can center header in box created by additional "cover <div>" and with position:absolute; you can position "cover div"...

    But if you want elastic design independent to resolution of screen this solution is not applicable.
    Vlado Tovarnak

    "The more I want to get something done, the less I call it work."
    "In order to win, you must expect to win."

    by RICHARD BACH


    http://www.ValuesGuide.com is now producing and providing leads for real estate agents

  10. #10
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    4,838

    Default Re: CSS: Absolute Positioning Challenge

    Quote Originally Posted by kyle422
    I can't figure out. Why not use just use a container instead of absolute positioning?
    With a little help I've got the "navlist" to finally display properly. Whew, that was a drag. Thanks for looking into it.

    As for a container, I'm wanting to use the "Absolute Positioning" so that the page content is higher on the page than the navigation.
    Used Mobile Homes For Sale
    Used Manufactured Homes For Sale
    SalesPractice.com -The Definitive Source for Sales Education on the Internet. - Sales Training

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts