Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
IE7 Conditional Comments problem
Old 05-08-2007, 09:06 AM IE7 Conditional Comments problem
sirNemanjapro's Avatar
Novice Talker

Posts: 9
Name: Nemanja Cosovic
Location: Cacak, Serbia
Trades: 0
Hi!

I'm trying everything to make layout stand proper in IE7 but it seems its getting the best of me.

I tried with all possible conditional comments that I can use but the IE just refuses to accept them:
Code:
<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->

<!--[if gt IE 6]>
According to the conditional comment this is Internet Explorer greater than 6<br />
<![endif]-->
The site I'm talking about is > here.

I have tested this locally and on line, both times the same.

I just need help how to make IE7 read the blody .css file. :crazy:
sirNemanjapro is offline
Reply With Quote
View Public Profile Visit sirNemanjapro's homepage!
 
 
Register now for full access!
Old 05-08-2007, 10:33 AM Re: IE7 Conditional Comments problem
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Nothing wrong with your conditional comments, but you need to remove this from your page:

Quote:
<?xml version="1.0"?>
It throws IE into Quirks mode.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-08-2007, 04:51 PM Re: IE7 Conditional Comments problem
Novice Talker

Posts: 7
Trades: 0
I don't think it has to do with your comments tags. I'm thinking the reason why its not working correctly is because you site is not designed in tables. When I viewed the source all the css is referencing <div> tags. Firefox and IE view <div> tags differently (I had the same problem in the past).
__________________

Please login or register to view this content. Registration is FREE
c258 is offline
Reply With Quote
View Public Profile
 
Old 05-08-2007, 06:40 PM Re: IE7 Conditional Comments problem
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
Firefox and IE view <div> tags differently
That is SO wrong and tables would be WORSE !!!

Quote:
I don't think it has to do with your comments tags.
The xml declaration is NOT a 'comment' and it specifically throws IE into fits !
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-08-2007, 09:28 PM Re: IE7 Conditional Comments problem
sirNemanjapro's Avatar
Novice Talker

Posts: 9
Name: Nemanja Cosovic
Location: Cacak, Serbia
Trades: 0
LadynRed, is 100% correct.
I still cant believe how stupid have I been not to see that.
I'm really sorry.

Thank you!

__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
sirNemanjapro is offline
Reply With Quote
View Public Profile Visit sirNemanjapro's homepage!
 
Old 05-08-2007, 09:52 PM Re: IE7 Conditional Comments problem
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Quote:
Originally Posted by c258 View Post
I'm thinking the reason why its not working correctly is because you site is not designed in tables.

Aaaaaaaagggggggghhhhh!!!!!!!



Now that I got that off my chest, NO TABLES.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 05-08-2007, 10:18 PM Re: IE7 Conditional Comments problem
sirNemanjapro's Avatar
Novice Talker

Posts: 9
Name: Nemanja Cosovic
Location: Cacak, Serbia
Trades: 0
I must add, I have erased <?xml version="1.0"?> as LadynRed said. But All I got was strange behavior of IE 6.

So considering that will not work, or I cant do this right, I must ask for further assistance from here.

Is there a way, any way, to serve IE 7 one set of CSS files, and to all the others another set of CSS files ( current ). Because I cant think of anything right now ( 4AM ).
I'm considering some JavaScript could do the trick, but, php also is an reasonable option.

What do you think?

Is there some out-of-the-box solution or it must be custom made?


btw on the tables sub-topic
I'm doing tables sites for a year and few months now. No turning back.
Wanna be a pro, you got to work as a pro.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by sirNemanjapro; 05-08-2007 at 10:34 PM..
sirNemanjapro is offline
Reply With Quote
View Public Profile Visit sirNemanjapro's homepage!
 
Old 05-09-2007, 12:37 AM Re: IE7 Conditional Comments problem
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
I'm wondering what the issue is. I checked the page in Firefox and IE and both looked the same to me.

You can use some javascript browser detection to serve different css files and a quick search should give you plenty of results, but it's a messy solution. The conditional comments should work. I'm wondering if using the gt IE 6 is throwing things off a bit since that conditional comment would also apply to IE7.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 05-09-2007, 08:24 AM Re: IE7 Conditional Comments problem
sirNemanjapro's Avatar
Novice Talker

Posts: 9
Name: Nemanja Cosovic
Location: Cacak, Serbia
Trades: 0
I tried with setting IE7 in conditional comment but I get the same thing.
I cant force IE7 to read the css file I want him to. Here is what I have found on the subject:

Quote:
How to trigger quirks mode

Some doctypes (Sivonen; Gutfeldt; Bergevin) or the inclusion of an <xml> declaration, trigger “quirks mode” or backwards compatible mode in IE 6. In that case, IE 6 acts like IE 5.5, and shares the same bugs, problems and behaviour as its elder brother.
In IE 7, an <xml> declaration no longer changes the rendering mode (Campbell). Authors who want to keep all versions of IE up to IE 7 in quirks mode (without affecting other browsers) cannot rely on this anymore. However, inserting a comment before the doctype (but after the <xml> declaration) will still trigger quirks mode in IE 7, as in the example below.
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- ... and keep IE7 in quirks mode -->
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Quirks mode in IE 7 can also be triggered when coding HTML 4.01 documents. Inserting a comment before the DTD will trigger this backwards compatible mode in both IE 6 and IE 7.
  1. <!-- quirks mode -->
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Check the rendering mode

It isn't always obvious which rendering mode a browser is in. In IE address line, type in:
  1. javascript:alert(document.compatMode)
A bookmarklet (Dorward) may help you determine which mode a document is in. Right-click on the following link in IE and bookmark it: QorS Mode.
resource from here

AND I DID IT!

Solution is to put the comment after the <xml> declaration and before doctype. I think this should be a sticky.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by sirNemanjapro; 05-09-2007 at 08:29 AM..
sirNemanjapro is offline
Reply With Quote
View Public Profile Visit sirNemanjapro's homepage!
 
Reply     « Reply to IE7 Conditional Comments problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28979 seconds with 12 queries