...

View Full Version : Browser StyleSheet issue



SiKni8
07-30-2011, 03:33 AM
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

alykins
07-30-2011, 03:45 AM
<!-- [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.

SiKni8
07-30-2011, 03:56 AM
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! :)

SiKni8
07-30-2011, 03:59 AM
<!-- [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

alykins
07-30-2011, 03:59 AM
?
... 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...

SiKni8
07-30-2011, 04:01 AM
?
... 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

alykins
07-30-2011, 04:12 AM
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 (http://validator.w3.org/check?uri=http%3A%2F%2Fsikni8.com%2Ffv%2Findex.htm&charset=%28detect+automatically%29&doctype=Inline&group=0)

SiKni8
07-30-2011, 04:16 AM
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 (http://validator.w3.org/check?uri=http%3A%2F%2Fsikni8.com%2Ffv%2Findex.htm&charset=%28detect+automatically%29&doctype=Inline&group=0)


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

tracknut
07-30-2011, 05:15 AM
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

Apostropartheid
07-30-2011, 06:43 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum