Results 1 to 5 of 5

Thread: Problems with DIV layers

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problems with DIV layers

    hi guys
    i sliced this layout in photoshop as DIV layers;

    How can i center the DIV Layers so that when u open it in the browser the layout appears in the center of the page

    here's the link: http://creativelv.net/facia/gallery/

    Can u please help?

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    add this to the style:

    Code:
    #container {
         text-align:center;
    }
    and your first div in the body change to this:

    Code:
    <div id="container">
    There is a lot there to clean up, both CSS and HTML but this should get you started.
    Last edited by BLiZZaRD; 01-22-2008 at 03:02 PM.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I Tried to add it but it didn't work, it just broke the layers apart one all the way to the right and the other at the bottom

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Did you close your div's correctly? If you have an open one somewhere then the whole process is out of whack.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Jan 2008
    Location
    Portland, Oregon
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    if you're still having problems with centering div content -
    I tend to do this outa habit cause the flow is easier for me to visualize...

    <style> .parentContainer{ margin: auto;} </style>

    <div class='parentContainer'>
    <div class='child'>
    </div>
    </div>

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
  •