Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 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
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #3
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts


    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; 09-26-2006 at 05:03 PM.

  • #4
    New Coder
    Join Date
    Sep 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    [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; 09-26-2006 at 05:49 PM.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote 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!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •