Results 1 to 4 of 4

Thread: alignment problem

  1. #1
    Join Date
    Nov 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default alignment problem

    my page is divided into two parts: header and content. but i can't align them together. I have been working on this for the past 2 hours and no luck. please help.

    here's my site: http://jrod.awardspace.com/prod2.html

  2. #2
    Join Date
    Aug 2007
    Location
    Brazil
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can put both in a container div and apply the width you want and margin: 0 auto; to center both. Remembering that, in order for the centering to work on IE, you also have to define text-align: center; for the body, and text-align: left; for the container.
    Code:
    body {
        ...
        text-align: center;
    }
    
    div#container {
        ...
        text-align: left;
        width: whatever you want;
        margin: 0 auto;
    }
    Is that what you want to achieve?

  3. #3
    Join Date
    Nov 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much!

    i'm new to css so i don't much about the rules. i appreciate it.

  4. #4
    Join Date
    Aug 2007
    Location
    Brazil
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No problem. =)

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
  •