Results 1 to 6 of 6

Thread: Annoying CSS quirk

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    1,066
    Thanks
    1
    Thanked
    0 times in 0 posts

    Annoying CSS quirk

    As tedious as this is any help would be appreciated

    Home : Northern Plant and Haulage Limited

    Simple CSS centring issue - the above site works fine in Firefox but the container div is aligned to the left in IE.

    the css file

    Can anyone see what's going wrong?
    Last edited by RoGuE|SaBeR; 27-02-2008 at 12:53 AM. Reason: screwed up the css link

  2. #2
    Custom User Title
    Join Date
    Oct 2005
    Location
    Wirral UK
    Posts
    1,168
    Thanks
    10
    Thanked
    14 times in 14 posts
    • cougarslam's system
      • Motherboard:
      • Asus Maximus Formula SE (ROG)
      • CPU:
      • Core 2 Duo E6600 @ 3ghz
      • Memory:
      • 4gb Corsair DDR2
      • Storage:
      • 1TB
      • Graphics card(s):
      • BFG Nvidia 8800GT OC 512MB
      • PSU:
      • Corsair HX520
      • Case:
      • Zorro
      • Operating System:
      • Vista Business 32
      • Monitor(s):
      • 2 x 17" crt
      • Internet:
      • adsl max (entanet)

    Re: Annoying CSS quirk

    have you tried removing the 0 from the wrapper

    #wrapper
    {
    margin: auto;
    width: 760px;
    }

    instead of


    #wrapper {
    margin: 0 auto;
    width: 760px;
    }

  3. #3
    Network|Geek kidzer's Avatar
    Join Date
    Jul 2005
    Location
    Aberdeenshire
    Posts
    1,732
    Thanks
    91
    Thanked
    47 times in 42 posts
    • kidzer's system
      • Motherboard:
      • $motherboard
      • CPU:
      • Intel Q6600
      • Memory:
      • 4GB
      • Storage:
      • 1TiB Samsung
      • Graphics card(s):
      • BFG 8800GTS OC
      • PSU:
      • Antec Truepower
      • Case:
      • Antec P160
      • Operating System:
      • Windows 7
      • Monitor(s):
      • 20" Viewsonic
      • Internet:
      • ~3Mbps ADSL (TalkTalk Business)

    Re: Annoying CSS quirk

    If memory serves (and I read this this just this afternoon, so it should!) - IE develops an issue with certain DOCTYPEs where some alignment of block level elemts goes funky, I had the same issue today with a template I'm doing it.

    As a quick test, try changing the DOCTYPE at the top of your document to the following XHTML one;

    Code:
    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    I've just tried it after saving the page locally, it seems to work - might need to redo some tags to make it XHTML compliant if thats a suitable 'fix' for you.
    "If you're not on the edge, you're taking up too much room!"
    - me, 2005

  4. #4
    Custom User Title
    Join Date
    Oct 2005
    Location
    Wirral UK
    Posts
    1,168
    Thanks
    10
    Thanked
    14 times in 14 posts
    • cougarslam's system
      • Motherboard:
      • Asus Maximus Formula SE (ROG)
      • CPU:
      • Core 2 Duo E6600 @ 3ghz
      • Memory:
      • 4gb Corsair DDR2
      • Storage:
      • 1TB
      • Graphics card(s):
      • BFG Nvidia 8800GT OC 512MB
      • PSU:
      • Corsair HX520
      • Case:
      • Zorro
      • Operating System:
      • Vista Business 32
      • Monitor(s):
      • 2 x 17" crt
      • Internet:
      • adsl max (entanet)

    Re: Annoying CSS quirk

    your html looks like strict so use doctype posted by kidzer then run it through a validator to ensure no invalid tagging.

    useful firefox html validator.

    Html Validator for Firefox and Mozilla

  5. #5
    Senior Member
    Join Date
    Jul 2003
    Posts
    1,066
    Thanks
    1
    Thanked
    0 times in 0 posts

    Re: Annoying CSS quirk

    I tried just changing the wrapper element at first which didn't do anything.

    After changing the DOCTYPE it does indeed work a treat. I'll have a run through the site tomorrow to check it for validation with the new DOCTYPE.

    Cheers for your help

  6. #6
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    Re: Annoying CSS quirk

    text-align: center; on the wrapper also should work for IE.
    To err is human. To really foul things up ... you need a computer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CSS / IE Help
    By ikkitousen in forum Software
    Replies: 18
    Last Post: 24-01-2008, 06:39 PM
  2. Browsing without CSS...
    By Funkstar in forum General Discussion
    Replies: 3
    Last Post: 17-11-2007, 09:51 PM
  3. divs and CSS
    By Kezzer in forum Software
    Replies: 11
    Last Post: 18-11-2003, 12:51 PM
  4. CSS + Other Language Questions
    By Jonny M in forum Software
    Replies: 7
    Last Post: 11-10-2003, 11:17 PM

Posting Permissions

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