SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    div align="center"

    If I choose to use the <div align="center"> , then in FF everything seems normal but in IE, all the content is centered. Now, if remove the align center, IE looks normal but in FF everything gets messed up.

    What am I doing wrong?

    Thanks

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using obsolete code for starters. The align="center" attribute is designed to center the content.

    I'm also going to go out on a limb and presume you're not using a complete and proper DOCTYPE. What's your code look like?

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i actually fixed the problem, I assigned the div a class, and then style it like this

    #content {
    width: 854px;
    margin: 0 auto;
    }

    it works now

  4. #4
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by hboeriu View Post
    i actually fixed the problem, I assigned the div a class, and then style it like this

    #content {
    width: 854px;
    margin: 0 auto;
    }

    it works now
    good for you! but are you doing the thins the right way? do you have a DOCTYPE in your HTML file like Dan said?


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
  •