SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Apr 2004
    Location
    PA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    All Absolute Divs....

    OK, not sure if this is the right place for this, but here goes. I have spent the past two months tweaking my site with a fluid design, converted it to mostly CSS (it was all css until i integrated a third part shopping cart) and made it database driven.

    Now when I am just about finished I have decided my home page will be simplified, so I created a simple layout with all absolutely placed divs. Is there anything wrong with this? I will define each area so I don't have to worry about things expanding and most of the boxes will be images anyway...

    Is there anything wrong with this:

    http://www.evolutionmsport.com/new_home.htm

    My normal site would just be:

    http://www.evolutionmsport.com/

    Note: All my secondary pages will remain as is for the most part.

    Thanks....mike
    Evolution Motorsport
    The Performance Company

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey.

    I don't know if it bothers you, but doing it this way gives you a scrolling problem. Make your window quite small and you'll see. You can't scroll left or up. I can see that it will fit an 800x600 screen and that's cool, but you are forcing those people to maximise the window to be able to see the site properly. I'd at least take this "height: 570px; top: 50%; margin-top: -285px;" out of your #container style - you really don't need it - the scrollbar works fine. (By the way, I do the same thing with the horizontal positioning on my site and I hadn't really thought about a scrolling problem until I checked your page).

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,549
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi mike,

    I'd use the margin-auto technique to centre your site and then it won't disappear off the side of the browsers as mentioned by bon Rouge above. You can set a min-width for mozilla to hold in position also.

    As to vertical centering I don't really thing thats needed as there's no way to stop the page disappearing off the top.

    Regarding laying out your page with absolute elements is fine if that's what you want to do. As long as you know that no height or width can expand and you are prepared to control it all then absolute positioning is very easy. As you say its mostly images then there should be no problem.

    Paul

  4. #4
    SitePoint Addict
    Join Date
    Apr 2004
    Location
    PA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BonRouge and Paul,

    Thanks for the comments. I changed the centering to the margin-auto technique and ditched the vertical centering. Now it looks pretty good.

    Here it is so far:

    http://www.evolutionmsport.com/newHome.php

    Thanks...Mike
    Evolution Motorsport
    The Performance Company


Bookmarks

Posting Permissions

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