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 10 of 10
  1. #1
    New Coder
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Browser StyleSheet issue

    I have the following script on my page:
    <![if !IE]>
    <div id='logowrapper'>
    <span class='siteLogo'><img src='logo2.png' align=abstop /></span>
    <span class='findUs'><img src='fLogo.png' border=0 title='Follow us on Facebook' align=abstop /><span class='topdvr'><img src='top_nav_dvr.png' alt=' - ' /></span><a href='www.twitter.com/' target='_blank'><img border=0 title='Follow us on Twitter' src='tLogo.png' align=abstop /></a></span>
    </div>
    <![endif]>
    <!--[if IE]>
    ***** APPLY SAME DIV SO IE RECOGNIZES SAME WAY AS OTHER BROWSER
    <![endif]-->

    And i use the following CSS to style the NOT IE browser above:
    #logowrapper{
    margin:15px auto;
    padding:0px 22px 0px 75px;
    width:1049px;
    }
    .siteLogo {
    width:45%;
    }
    .findUs {
    padding: 0px 0px 0px 400px;
    width:45%;
    }

    +++++++++++++++++++++++++++

    Now my question is how do I achieve the same effect when the user in Internet Explorer browser, either thru DIV or TABLE style?

    Thank you

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,662
    Thanks
    41
    Thanked 189 Times in 188 Posts
    Code:
    <!-- [if IE]>
    #logowrapper{
    new style
    }
    .siteLogo {
    new style
    }
    .findUs {
    new style
    }
    <!--[end if] -->
    my <!-- [if IE]>'s may be wrong, I do not do too many conditional statements.

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #3
    New Coder
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation

    This is my site HTML:
    http://sikni8.com/fv/index.htm

    If you notice the top part (Logo and the FB and T Logo) shows different on how IE and other browser displays... how do i fix the CSS style for the top header so that its displayed same across different browser?

    Thank you

    P.s. i really need the assistance!

  • #4
    New Coder
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by alykins View Post
    Code:
    <!-- [if IE]>
    #logowrapper{
    new style
    }
    .siteLogo {
    new style
    }
    .findUs {
    new style
    }
    <!--[end if] -->
    my <!-- [if IE]>'s may be wrong, I do not do too many conditional statements.
    Thank you for the response, but my issue was that even tho the same css is used, IE displays something totally weird then other browser does... how do i fix the css for the IE so its displayed the same way as lets say Chrome, Safari, and Firefox and even mobile browser?

    Thank you

  • #5
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,662
    Thanks
    41
    Thanked 189 Times in 188 Posts
    ?
    ... see my previous post.... you can use the conditional statement to do local style or even (correct me if I'm wrong) link to an entirely different style sheet... not sure how much more help anyone can give...

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #6
    New Coder
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by alykins View Post
    ?
    ... see my previous post.... you can use the conditional statement to do local style or even (correct me if I'm wrong) link to an entirely different style sheet... not sure how much more help anyone can give...
    I really appreciate the assistant, but if u open the site in IE and Firefox u will see two different result. what I really wanted to know how do i code in the IE CSS so its displayed the same as it does in FF?

    Thanks

  • #7
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,662
    Thanks
    41
    Thanked 189 Times in 188 Posts
    as noted above, i am not too familiar w/ conditionals (as I do not regularly use them) but I am pretty sure you can only use them in the <head> tags... also you have 14 errors, possibly due to the missing doctype, but i would fix the errors first before continuing on
    see here

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #8
    New Coder
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by alykins View Post
    as noted above, i am not too familiar w/ conditionals (as I do not regularly use them) but I am pretty sure you can only use them in the <head> tags... also you have 14 errors, possibly due to the missing doctype, but i would fix the errors first before continuing on
    see here

    "<![if !IE]>" = i am using it based on determining if its IE or not... what is the correct convention? Thanx

  • #9
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,139
    Thanks
    7
    Thanked 257 Times in 256 Posts
    Let's back up a step... you have no doctype in the file, which means IE will try to display it in compatibility mode, whereas everything else will display it in standards mode. Put in a doctype, get rid of all the conditional IE stuff, and just make it work in standards mode on all browsers. Unless you're trying to get something to work in IE6, there is very little reason for the conditional IE stuff anymore.

    Dave

  • #10
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by tracknut View Post
    Let's back up a step... you have no doctype in the file, which means IE will try to display it in compatibility mode, whereas everything else will display it in standards mode.
    This is only half true. I suggest you reference our help thread on the matter.

    The advice, however, is still true; you must have a Strict doctype to expect browser compatibility.

    In addition, <![if IE]> serves no purpose, as the enclosed code is read by other browsers. Use the <!--[if IE]> syntax instead, as you have further down in your code.


  •  

    Posting Permissions

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