SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css alignment issues - help needed

    Hi, I'm having some layout issues with my site and I'm hoping someone would be kind enough to point me in the right direction for fixing the HTML/CSS.

    My website (redesign) is here:

    motionphi.com/redesign

    It's a pretty simple layout with a header, main content, and footer all within a container div. the container div is wrapped in another div to get a drop shadow effect.

    The site looks fine in Firefox on Mac. On Safari, Chrome and Opera it is severely broken.

    I was all behaving nicely until I introduced floats to the header section. I believe I need to use floats to properly have a two column layout in the header (logo on the left, graphic text and links on the right), but if there is another way to code this I'd like to know.

    This is a link to the way it is supposed to look:

    motionphi.com/redesign/site_redesign.jpg

    Thanks in advance, any help is greatly appreciated!

    DS

  2. #2
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi motionphi, Welcome to SitePoint!

    I was all behaving nicely until I introduced floats to the header section.
    You just need to contain the floats within their parent's and clear the floats above the footer.

    These adjustments below should get things sorted out for you.
    Code:
    .oneColFixed #header {
        background-image:url(../images/topgradient.png);
        height: 180px;
        padding: 25px 35px 15px 35px;
        overflow:hidden;/*contain child floats*/
    }
    
    .oneColFixed #mainContent {
        width: 860px;/*IE6/7 haslayout*/
        padding: 0 20px;
        background: #d0d0d0;
        text-align: center;
        overflow:hidden;/*contain child floats*/
    }
    
    .oneColFixed #footer {
        width: 860px;/*IE6/7 haslayout*/
        clear:both;
        padding: 20px;
        background:#d0d0d0;
        text-align:center;
    
    }

  3. #3
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rayzur- worked like a charm. Thanks so much.


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
  •