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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS working fine in mozilla but not IE

    I am trying to redsign my sight and clean up the code with CSS and I am somewhat new to it altho I know the basics. My site is www.cableplease.com and it looks flawless on mozilla and looks hideous on IE and im very frustrated with it. Could someone tell me how to make my site look exactly the same on all browsers the way it looks on mozilla right now? I would prefer having a more advanced CSS writer rewrite the code the right way and post it up and i'll be able to look it over and implement it. I just want my site to appear on IE exactly the way it looks on mozilla right now.

    Thank you.
    Last edited by evo; 01-25-2009 at 01:16 PM.

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Not tryna sound harsh here, but the best way to make sure all browsers read your page the same way is to make sure it validates, and right now, you don't have a doctype or a chracter encoding, and your site breaks the validator. Those might be some good places to start..

    Dan

    EDIT: PS: Validator can be found here: http://validator.w3.org/
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    New Coder
    Join Date
    Dec 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I dont understand the validator very well. If I put up a validator, that will solve the problem? Which validator and version should I put on the site?

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Oh, and FTR, it looks essentially the same for me in FF2.0 and IE6

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #5
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    This article http://alistapart.com/stories/doctype/

    And of course this: Which Dtd (doctype) to use on page?

    should be helpful

    if you have more questions, let me know

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #6
    New Coder
    Join Date
    Dec 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by whizard View Post
    Oh, and FTR, it looks essentially the same for me in FF2.0 and IE6

    Dan
    What does it look like on FF2.0, is there alot of blue spaces in between the pictures and margins? I have IE7 (which I think is horrible already) and it looks bad on there.

  • #7
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Here is what it looks like in FF2



    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #8
    New Coder
    Join Date
    Dec 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, that is the one that looks perfect. I've been reading the articles about the doc types and i'm still trying to figure out which type of html and version i'm using.

  • #9
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    For you, I would go with HTML 4.01 Strict.

    EDIT: Here it is in IE6



    Dan
    Last edited by whizard; 12-27-2006 at 11:23 PM.
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #10
    New Coder
    Join Date
    Dec 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I put in this doc type:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    This made it look worse on mozilla and it still looks far more out of whack on IE. Wasnt the doc type supposed to make the pages look the same on all the browsers?

  • #11
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Not instantly, but it is a first step. It is a waste of time trying to make pages look good across all browsers without a doctype.

    Now try validating your site and fixing any errors that it gives you.

    EDIT: Your page still looks OK to me in FF2....

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #12
    New Coder
    Join Date
    Dec 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, I was actually able to validate the site, now I'm working on fixing the errors. These are some very strange errors such as:

    Line 49 column 100: there is no attribute "BORDER"
    Line 52 column 11: there is no attribute "ALIGN"

    There has to be a border or align command in HTML isnt there? What else can you use? Am I supposed to use these in the CSS style sheet? I already changed one line:

    <script type="text/javascript" language="javascript" src="zipformvalidate.js"></script>

    to:

    <script type="text/javascript" src="zipformvalidate.js"></script>

    because the validator said that (language="javascript") was wrong, so i deleted it, does this make sense?

  • #13
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Yes thats correct, there is no language attribute.

    You can do the border and align through CSS

    CSS Code:
    {
    border-width:--px
    }

    (where '--' = the number of px you want the width of your border to be)

    Here is a handy reference for HTML 4.01 strict:http://www.december.com/html/4/

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #14
    New Coder
    Join Date
    Dec 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for that link, I think I'm starting to get the hang of it a bit. Now I just have some CSS questions. I want that main picture (which is also a link) to have a border of 0. How can I do this in CSS?

    Now when all the validation errors are fixed, should my site look exactly the same on mozilla as it would on IE with the doc type I'm using?

  • #15
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    For the borderless image:
    CSS Code:
    Code:
    .image_without_borders
    {
    border:0px;
    }
    then, in that image tag:

    HTML Code
    Code:
    <img name="image_without_borders" />
    (Obviously you can change image_without_borders to something a little more meaningful.)

    Quote Originally Posted by wickland
    Now when all the validation errors are fixed, should my site look exactly the same on mozilla as it would on IE with the doc type I'm using?
    Maybe, but don't get your hopes up. The point is that now if any discrepancies arise, they can be addressed much more effieciently.

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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