Announcement

Collapse
No announcement yet.

Layout issue - auto-centred content not working in IE..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Layout issue - auto-centred content not working in IE..

    My layout is set to margin-left: auto; margin-right: auto; via an additional stylesheet.

    In Firefox the site is beautifully centred, but when I sent a link for the customer to view - he commented that he wanted it centred... of course he uses Internet Explorer and I hadn't tested in IE (tsk tsk me)

    Does anyone know why Internet Explorer would ignore the auto margin (centering) in the stylesheet?

    The site is in development and currently on trial hosting at http://trials.actinic.com/trials/tri...1/scottish.htm - view in Firefox - centred, view in IE - left justified... grrr!

    Style applied to the 'wrapper' DIV is:

    Code:
    #wrapper {
    	width: 804px;
    	margin-top: 0px;
    	margin-right: auto;
    	margin-bottom: 0px;
    	margin-left: auto;
    	border: 1px solid #CCCCCC;
    	background-color: #FFFFFF;
    	padding: 0px;
    }
    Thanks - hopefully....
    LouPhi

    #2
    This is a good example I always go by.

    Regards,
    Grant

    Comment


      #3
      hi

      i always add this to the body

      Code:
      text-align:center;
      and a wrapper for the site i use this

      Code:
      display:block;
      margin-left:auto;
      margin-right:auto;
      margin-top:3px;
      position:relative;
      text-align:left;
      width:1000px;
      im not saying this is right but it works for me, using the body styling to center the page and then the wrapper to align everything left again plus a few bits of personal styling

      Comment


        #4
        You want the wrapper centered but the body tags say not to, it's just confused what you want to happen. Fix your body tag styles (you have 2).

        Comment


          #5
          Thanks - that fixed it (not had the problem on other non-Actinic sites?)

          Odd... anyway, sorted and I'll remember the rule next time :O)

          Lou

          Comment


            #6
            You won't have had stylesheets with the same declarations all overriding each other i expect. If you have 3 stylesheets and all 3 have a body tag declaration inside, the last one to be read will be honoured. It's all about inheritance, specificity and the order in which things are read.

            Keep it simple and have one body declared in whichever stylesheet you want to be, don't have multiples of the same/similar thing.

            Comment

            Working...
            X