PDA

View Full Version : website issues in IE6...what to do?!?!



fracmo2000
May 1st, 2008, 05:50 AM
Well i have finally got the bulk of that website finished and its looking fine in FF and IE7...but its all over the place (seriously...all over the place) in IE6. I realise im a total novice when it comes to this as i started the website in XHTML 1.0 Strict...but somebody in work said it would be a better idea to use Transitional? They also said i just need to change the top of each html page...

from this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

to this...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Is that ok to do that?

Also...is there a method of checking the end-users browser and forcing them to upgrade to IE7?

EDIT - I have also checked the browser compatability in Dreamweaver and the only errors are 3 "Z-Index Bugs" (Which i was told in the tutorial that i completed they were ok???)

I also asked the web designer at my work about forcing a user to upgrade...she said that wasnt possible...but my mate who works with me said he has seen websites that if you dont have a specific browers - it takes you to another page? Anybody seen this...cause that would be ideal.

Thanks in advance folks

fracmo2000
May 1st, 2008, 10:31 AM
After some digging it seems IE6 renders the page different from other browsers. Mines goes like this:

http://img187.imageshack.us/img187/4593/ie7ji9.th.jpg (http://img187.imageshack.us/my.php?image=ie7ji9.jpg)

This is fine in IE7/FF


but IE6 looks like this
http://img187.imageshack.us/img187/9427/ie6pp0.th.jpg (http://img187.imageshack.us/my.php?image=ie6pp0.jpg)

I was wondering how folk got round this?

uksubhuman
May 1st, 2008, 11:13 AM
You can not (and definitely should not) force users to change their browser. If a significant portion of your user-base uses IE6, then you have to deal with the way IE6 renders your work.

However, you CAN affect IE6 directly without changing the way your site renders in other browsers. Conditional comments are unique to Internet Explorer browsers, and the syntax is treated just like any other HTML comment when viewed by other browsers:



<!--[if IE 6]>
<style type="text/css">
...IE 6 only styles go here...
</style>
<![endif]-->
You can put anything you want into a conditional comment, and target it to a wide range of IE browser versions. In this case you'll want to put the declaration in the <head> of your HTML document, and add some CSS to shrink the width of that navigation <div>.

QuirksMode has a pretty solid writeup about conditional comments:
http://www.quirksmode.org/css/condcom.html

fracmo2000
May 2nd, 2008, 05:26 AM
hi uksubhuman, thank you for taking time to reply to my post...its been driving me crazy...i thought i would have to re-do the full website! Pheew!

The test website is
www.clubrectify.co.uk/test/index.html

So, could i just leave the side blog out IF the browser if ie6 or below? At the moment the "sideblog" is on everypage...but i might try to get it working on the index and just remove it from the rest of the pages if it makes it easier.

I get what you mean - if browers is ie6 (or below) then use this css style...will read up on the link you posted and have a bash today! cheers dude