SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Guess my alignment problem, please.

    My site isnt live, so I need suggestions on what the problem might be.

    I have a border area header that is set to display: block; margin-left:auto; margin-right:auto; (It centers perfectly)

    Then the content area underneath looks the exact same, except it is a little off center to the right. What must the issue be?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,096
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    It would be best to make up a test page (with CSS included in <style> tags in the head) and post the code here so that we can see what's going on, as otherwise there's no way of knowing what's happening.

    Quote Originally Posted by robbdmc View Post
    I have a border area header
    Not sure what you mean by that, but no doubt the example code would make that clear.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Do you have any margins or settings applied to the off center items? Try putting this in your CSS file

    Code:
    *{margin:0;padding:0;}
    As Ralph said we really need code (enough to reproduce the problem, and preferably nothing more) to identify the issue.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, here's the css for part of the area that is off center... See anything that may be causing it to line up slightly right?

    .box_header{ background:url(5-black/box_top.png) no-repeat; width:992px; height:24px; }
    .box_bg{ background:url(5-black/box_bg.png) repeat-y; width:992px; }
    .box_bottom{ background:url(5-black/box_bottom.png) no-repeat bottom; width:992px; }

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,096
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    We really need to see the HTML that goes with that. Also make sure to try Ryan's code above. It may well be that some default margin or padding is causing a problem, and his code is a nice way of putting that to the test.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never-mind.. Problem finally solved. It wasn't actually a css issue. Those images were just larger than what my css said for the width, so they were displaying off center. Thanks for the help, and sorry for the vague question.

  7. #7
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,096
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    No problem! Often, just being able to ask a question helps you find the answer yourself—which is a perfectly good way to use a forum like this.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  8. #8
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    No problem! Often, just being able to ask a question helps you find the answer yourself—which is a perfectly good way to use a forum like this.
    So true... just pasting those images from my css made me realize it.


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
  •