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 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE acceptable CSS - Help

    Hello,

    I am designing a website for my band, and last night, I did my first cross-browser reference. I personally run Firefox, but then I went onto my mothers computer and used IE and it refuses to load my external CSS file, and if it does load it, it refuses to read and interperate any of it correctly. My file is short and I use it solely for paragraphs and links. I will post a link to my site, and include my CSS file in this post. Any help as to converting my css file to be read correctly by IE would be greatly appreciated.

    My Website

    Code:
    p{font-size: 10px; color: #EEEEEE; font-family: ARIAL;}
    p.sitemap{font-size: 9px; font-family: ARIAL; color: #EEEEEE; line-height: 1pt;}
    p.news{font-size: 12px; font-family: ARIAL; color: #EEEEEE; font-weight: bold;}
    p.divider{font-size: 9px; font-family: ARIAL; color: #AAAAAA;}
    p.live{font-size: 10px; color: #EEEEEE; font-family: ARIAL; line-height: 4pt;}
    
    a:link{color: #A2322E; text-decoration: none;}
    a:visited{color: #A2322E; text-decoration: none;}
    a:hover{color: #FFFFFF; text-decoration: underline;}

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It may not like the fact you have a space before the filename...

    <link rel="stylesheet" type="text/css" href="main.css" />

    You also don't have a DOCTYPE which could cause different browsers to render it differently, and I see some deprecated tags in there too...

  • #3
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When I type in the <link rel... line, I do not include the spaces, I am unsure why that space gets added in. Could you reference me to an appropriate DOCTYPE line I could use?

  • #4
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe your FTP program or server is corrupting your files? ...edit, I see it's working in IE now though.

    It's generally best to use a XHTML 1.0 DOCTYPE.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    With your current coding though you will have a lot of errors.

  • #5
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What errors do I have in my coding?

  • #6
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    At the moment I'm not sure because it can't validate your page!

    http://validator.w3.org/check?verbos...dny2/home.html

    I said there will be errors though because XHTML requires all tags are closed, eg. "/>" for thing's like <br /> and <img /> etc, and you'd need to specify character encoding.

    At the end of the day, most errors won't make a difference to how your page looks though, but most people will say "fix those errors!"

  • #7
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, with the help I was able to get the CSS working in IE. I would like to fine tune my coding, because I do it all myself, and I would like to be as sound as I can with it.

    So what you mean by ending all ym tags would mean:

    <img src = "whatever.jpg" border = "0" />

    What are other tags I would need to end like that?

    I really appreciate all this help.

  • #8
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I updated my home.html with all my <br> and <img> tags ended. What else can I do to refine my coding?

  • #9
    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
    Any tag that doesn't have a closing tag so for example, the <br> tag has no closing tag in HTML so you need to self close it like so <br />, same goes for <hr> tags, link tags. This is wrong
    Code:
    <html>
    <head>
    <title>Lost Ledny</title>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <link rel="stylesheet" type="text/css" href="main.css" />
    </head>
    change it to this
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Lost Ledny</title>
    <link rel="stylesheet" type="text/css" href="main.css" />
    </head>
    There is a lot more that needs to be done. For example the stuff in your body tag should all be done in CSS. Same goes for other places that you use bgcolor. If it can be done in CSS then do it in CSS.
    Last edited by _Aerospace_Eng_; 09-20-2006 at 07:38 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #10
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So if though you end links with </a> I should still add the /> at the end of the initial tag?

    <a href = "home.html />Home</a> ?

  • #11
    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
    No I said any tag that DOESN'T have a closing tag. An anchor tag does have one doesn't it? I added to my post above, reread it.

    Has closing tag, don't self close
    Code:
    <a href="#">blah</a>
    Has no closing tag, self close
    Code:
    <img src="blah.jpg" alt="" />
    Has no closing tag, self close
    Code:
    <hr />
    Has no closing tag, self close
    Code:
    <br />
    Has no closing tag, self close
    Code:
    <link rel="stylesheet" href="style.css" type="text/css" />
    Has no closing tag, self close
    Code:
    <input type="text" />
    Last edited by _Aerospace_Eng_; 09-20-2006 at 07:41 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #12
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My apologies, I thought of 'link tags' as the <a>. Thank you for your help and being patient with me. I will continue tweaking my coding.


  •  

    Posting Permissions

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