Web Analytics Made Easy -
StatCounter CSS centering problem in Firefox - CodingForum

Announcement

Collapse
No announcement yet.

CSS centering problem in Firefox

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

  • CSS centering problem in Firefox

    I'm working on a horizontally fixed and vertically centered design using CSS at the moment. Here's what I've done so far.

    As you can see I've placed all the site's content within a container which I am trying to center using body{text-align: center}. It works in IE but Firefox seems to be ignoring text-align and also my margin settings for some reason.

    Also on my classes page, Firefox seems to be stretching the height of the table cells for some reason. I don't know why.

    This is my first attempt at CSS so I'm sure I've just made a silly mistake somewhere. Anyhow, I'd appreciate it if anyone could help. Thanks!

  • #2
    use margin:auto; on the #container instead of margin:0; IE incorrectly uses text-align:center; to center divs. margin:auto; is the correct way. As for your tables expanding paragraphs have default margins and padding, you need to 0 those out or just not use a paragraph at all. I say not use one at all as they seem to serve no purpose on that page.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3


      Tut tut…



      I won't even ask what a masked rioter with flowers at his feet has to do with yoga.
      Change it to something else, something original and more relevant - and not only will increase the chances of fulfilling the brief suitably, but you'll also reduce the chances of yourself and/or your client being sued for copyright infringement.
      Last edited by Bill Posters; Sep 26, 2006, 12:03 PM.
      Why you should validate your code before asking for help...

      Comment


      • #4
        Thanks, Arospace, that fixed it! I'd also like there to be no margin space above the top of the container. I've tried body{margin-top: 0px} but once again this works in IE but not in Firefox. Any ideas?

        Bill, yeah I thought the logo was weird too, but he had it drawn and gave it to me. Not sure about the copyright issues because it's graffiti, but I'll mention it.

        Comment


        • #5
          [ot]

          Whilst Banksy has done a number of variations of the rioter with flowers in graffiti/wall stencil in public spaces, the image to which I linked has been produced (by Banksy) as a print.

          http://www.artofthestate.co.uk/Banks...nd_chucker.htm

          The fact that the print is based on graffiti/stencil style makes no difference to its status as a copyrightable image.

          The logo produced for use in your project is undeniably a 'derivative artwork' of the print version, and given that it is highly unlikely to fall under 'fair use' exemptions, is, imho, almost certain to qualify as a breach of Banksy's copyright.

          Your boss is a chancer (and the individual who drew it for him/her is little better).

          [/ot]
          Last edited by Bill Posters; Sep 26, 2006, 12:49 PM.
          Why you should validate your code before asking for help...

          Comment


          • #6
            Originally posted by teiuq1 View Post
            Thanks, Arospace, that fixed it! I'd also like there to be no margin space above the top of the container. I've tried body{margin-top: 0px} but once again this works in IE but not in Firefox. Any ideas?
            And we are supposed to know what page you are talking about how?
            ||||If you are getting paid to do a job, don't ask for help on it!||||

            Comment

            Working...
            X