SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    browser differences

    I'm just getting started in web design and have a problem with the style sheets on IE. I was able to design the site and test it on a Mac using Safari 5.0.6 and Firefox 3.6.28 browsers. When the site looked complete, I tested it on my Windows laptop using IE9 and the alignment wasn't even in the ballpark. It appeared that the positioning wasn't observed or the javascript code executed. Is it necessary to create a javascript routine to determine the browser and create an entire set of styles just for IE? Can anyone recommend a good resource that explains the CSS differences between the browsers?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,219
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Hi cjbergin. Welcome to the forums.

    Is it necessary to create a javascript routine to determine the browser and create an entire set of styles just for IE?
    Absolutely not! IE9 should render your styles just fine, so it's highly likely there is an error in your CSS. Feel free to post a link, or at least run your site through the HTML and CSS validators.

  3. #3
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Hi cjbergin. Welcome to the forums.



    Absolutely not! IE9 should render your styles just fine, so it's highly likely there is an error in your CSS. Feel free to post a link, or at least run your site through the HTML and CSS validators.
    the URL is nexusdesign.us. If you could view the source code, perhaps you could point me in the right direction.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,219
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    OK, yeah, quite a few coding problems there. For a start, your page needs to have a doctype at the top. Otherwise, browsers go into "quirks mode". Here is a list of the HTML problems:

    http://validator.w3.org/check?uri=ne...Inline&group=0

    See if you can address those first (ad feel free to ask for help if you don't understand what to do).

  5. #5
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow, what a rookie mistake. Good catch. All set for now. What other issues did you see?

  6. #6
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind, I'm going through it now.

  7. #7
    SitePoint Wizard webcosmo's Avatar
    Join Date
    Oct 2007
    Location
    Boston, MA
    Posts
    1,480
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can always use CSS hacks to quick fix your CSS.
    Eg:

    .div {
    height: 10px;
    }
    .div {
    *height: 12px; /* IE6+7, doesn't work in IE 8/9 as IE7 */
    }
    .div {
    _height: 14px; /* IE6 */
    }
    .div {
    height: 10px \0/; /* IE8+9 */
    }
    @media all and (min-width:0) {
    .div { height: 10px; \0/; } /* IE9-IE10pp4 */
    }
    Before \0/ the space is compulsory, otherwise yu will also match Opera.

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,219
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by webcosmo View Post
    You can always use CSS hacks to quick fix your CSS.
    Best saved an an absolute last resort.

  9. #9
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, Ralph was able to point out a glaring error and now I think it is fixed. Cosmo, you sound like a CSS guru. I'm in Massachusetts as well.


Bookmarks

Posting Permissions

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