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 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2012
    Location
    Leicester
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question CSS Styling Problem

    Hi all,
    I am having a little issue with css for my site, when I access the site in Google Chrome it all appears fine, formatted and set out how I want it to look, but if I then go onto Internet Explorer the CSS has no effect and the page displays without all the formatting from the CSS, does anybody have any ideas what could be wrong?
    The main problem is the margin and padding for my buttons. If anyone could help it would be much appreciated

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Can you post a link to your site?

  • #3
    New Coder
    Join Date
    Mar 2012
    Location
    Leicester
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts

    site link

    link to site http://findfriends.webatu.com/
    the css file is at http://findfriends.webatu.com/css/main.css
    thanks for any help in advance !
    it works displays 95% fine in all other browsers apart from when you zoom in / out (Google Chrom, Opera, Firefox) but in internet explorer it has near to no formatting
    Last edited by fightapilotdean; 12-05-2012 at 10:39 AM. Reason: add extra details

  • #4
    New Coder
    Join Date
    Nov 2012
    Location
    new york
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    because my friend in Internet explorer you need to be careful to get the result of your css as you get it other browser. That's why we use separate style sheet for IE to follow its Structural requirement.

  • #5
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    You always need a DOCTYPE in your code. So make the top look like this:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <link href="css/main.css" rel="stylesheet" type="text/css">
    <title>findFriends - A new social Network</title>
    </head>
    <body>
    ....
    Then be sure to close out the body and html tags at the bottom:
    Code:
    ....
    </body>
    </html>
    That will probably do it. The validator is your friend to help find bugs!

    There should be no need for separate style sheets for IE, unless perhaps you're trying to make this work in IE6/7.

    Dave


  •  

    Tags for this Thread

    Posting Permissions

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