12 replies [Last post]
webster12345
webster12345's picture
User offline. Last seen 1 year 23 weeks ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2010-07-23
Posts: 25
Points: 35

Hi all

I have built my site and tested it along the way using firefox 3.6.8 and ie 8. However when i sent it to a friend to view he looked at it in ie6, the site didn't look like it was supposed too all kinds of things went wrong. So my question is..... whats good practice here, do i put a disclamier on my site that says, something like 'this site has been tested in firefox 3.6.8 and IE8 ' or do i need to ensure it works in all browsers ?

Thanks

CupidsToejam
CupidsToejam's picture
User offline. Last seen 2 weeks 1 day ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

a few thing to do. style the

a few thing to do.

style the site so it looks good in FF, Safari.
then use conditional statements to create styles for specific browsers. More simple layout... or create a whole new style sheet to target IE6.

or, if you're like me...
block access to the website for everybody with IE. This isnt what most people do, and is counter-productive. I just dont give a *beep*.

If the site breaks in IE6, you really should try and figure out why, then fix it.


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com

Debayan Gupta
Debayan Gupta's picture
User offline. Last seen 1 year 18 weeks ago. Offline
rank Regular
Regular
Timezone: GMT-4
Joined: 2010-08-10
Posts: 45
Points: 51

IE6

A perfectly valid website that breaks in IE6 ? Where have I heard that before ?

Unfortunately, around 5-10% of people(!) use IE6 - this percentage is significantly greater in some countries (say, India >_<).

IE6 will break suddenly, sometimes for no apparent reason at all - however, the most common reason for content "breaking up" in IE6 is because it needs more width than you think it should. If you have any container divs, etc., try increasing their widths - but its impossible to say anything without looking at the code.

While I'm usually for progressive enhancement, when it comes to MSIE6, I'll side with CupidsToejam and go for graceful degradation.

Conditional commenting is the way to go.

PS. try this software called MultipleIEs - it does exactly what its name implies - then you can test on IE6/7/8.

webster12345
webster12345's picture
User offline. Last seen 1 year 23 weeks ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2010-07-23
Posts: 25
Points: 35

Hi CupidsToejam & Debayan

Hi CupidsToejam & Debayan Gupta

Thank you for your responses and i will indeed investiage conditional comments and check out MultipleIES. however i have a link to my site below. the most frustrating thing is i believe its a simple site, and not even my hover buttons work in ie7 or 6, nor in safari. When you mouse over the video clips you are supposed to see a yellow border. The site only works fully in ie8 and FF 3.6.8.

http://www.webster12345.zxq.net/home.html

my css page is located

http://www.webster12345.zxq.net/style.css

Deuce
Deuce's picture
User offline. Last seen 3 days 17 hours ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2005-11-20
Posts: 4416
Points: 1835

Validate your

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Debayan Gupta
Debayan Gupta's picture
User offline. Last seen 1 year 18 weeks ago. Offline
rank Regular
Regular
Timezone: GMT-4
Joined: 2010-08-10
Posts: 45
Points: 51

Try this..

Outline doesn't work on IE6.

Use a border. Just put a "display:block" on the "a" tag, and use a transparent border, and change the colour on hover.

Why are you using so many classes with similar functions ?
Inherit from multiple classes - it'll reduce your code significantly.

I've edited your html a bit :

	<div class="float">
		<a href="videos/intro.wmv"><img src="image/VIDEO-IMAGES.jpg" alt="introduction video clip" width="320" height="256"/></a>
		<p>Lorem ipsum dolor sit amet</p> 
	</div> 
 
	<div class="float right"><a href="&amp;"><img src="image/VIDEO-IMAGES2.jpg" width="320" height="256" alt="Overview of the health check process video clip"/></a> 
		<p>Lorem ipsum dolor sit amet</p> 
	</div> 

CSS :

.float {float:left;margin:0px 0px 50px 50px}/*default - left*/
.right {float:right;margin:0px 50px 50px 0px}/*make it ".float .right" if you want to*/
.float a {display:block;height:256px;border:4px transparent solid;}
.float a:hover {border-color:orange}

Validate.

webster12345
webster12345's picture
User offline. Last seen 1 year 23 weeks ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2010-07-23
Posts: 25
Points: 35

Hi Debayan Gupta Thanks for

Hi Debayan Gupta

Thanks for your reply, its much appreciated. i'm afraid im still quite new to css and not very confident, but learning all the time thanks to people like yourself. I guess i have many classes again because im not confident about what im doing, but have taken onboard your advice and will experiment at a less critical time. At the momment, i need to try and get this site working in as many browsers as possible. May i just clarify my understanding about your comments. Sorry if i have misunderstood you here....

With regard to the css should i change this

.float-left {
	width: 320px;
	margin-left: 50px;
	float: left;
	height: 256px;
	margin-bottom: 50px;
}
 
to this 
 
.float-left {
	width: 320px;
        float:left;margin:0px 0px 50px 50px;
        height: 256px;
 
}
 
and then should i change this 
 
.float-right a:hover {
 
outline: 4px solid #f90;
}
 
 
with 
 
 
.float-right a:hover
{border-color:orange;
 
}
 
and this 
 
a {
	color:#000;
	font-family: Verdana, Geneva, sans-serif;
 
}
to this 
 
a {
	color:#000;
	font-family: Verdana, Geneva, sans-serif;
        display: block;	
}

Debayan Gupta
Debayan Gupta's picture
User offline. Last seen 1 year 18 weeks ago. Offline
rank Regular
Regular
Timezone: GMT-4
Joined: 2010-08-10
Posts: 45
Points: 51

Without changing any class names..

1. First, correct your html code - there are many other problems, but to get this to work, you MUST remove the double a-tag - see below :

<div class="float-left"><a href="%"><a href="videos/intro.wmv"><img src="image/VIDEO-IMAGES.jpg" alt="introduction video clip" width="320" height="256"/></a> 
  <p>Lorem ipsum dolor sit amet</p> 
</div> 

See the first a-tag ? The one with href="%" ? Remove it, So that the code becomes :

<div class="float-left"><a href="videos/intro.wmv"><img src="image/VIDEO-IMAGES.jpg" alt="introduction video clip" width="320" height="256"/></a> 
  <p>Lorem ipsum dolor sit amet</p> 
</div> 

2. CSS - Replace these lines :

.float-left {
	width: 320px;
	margin-left: 50px;
	float: left;
	height: 256px;
	margin-bottom: 50px;
}
 
.float-right {
	width: 320px;
	margin-right: 50px;
	float: right;
	height: 256px;
	margin-bottom: 50px;
}
 
.float-right a:hover {
	outline: 4px solid #f90;
}
 
.float-left a:hover {
	outline: 4px solid #f90;
}

with these lines :

.float-left, .float-right {float:left;margin:0px 0px 50px 50px}
.float-right {float:right;margin:0px 50px 50px 0px}
.float-left a, .float-right a {display:block;height:256px;border:4px transparent solid}
.float-left a:hover, .float-right a:hover {border-color:orange}

Debayan Gupta
Debayan Gupta's picture
User offline. Last seen 1 year 18 weeks ago. Offline
rank Regular
Regular
Timezone: GMT-4
Joined: 2010-08-10
Posts: 45
Points: 51

PS. - Make sure you validate

Please validate your code !

Make sure you remove those extra "" (!) tags and all the other invalid stuff.

Valid code is better code.

Ed Seedhouse
Ed Seedhouse's picture
User offline. Last seen 3 weeks 1 day ago. Offline
rank Guru
Guru
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3544
Points: 643

Debayan Gupta wrote: A

Debayan Gupta wrote:

A perfectly valid website that breaks in IE6 ? Where have I heard that before?

But it's not a "perfectly valid" website at all. The HTML is replete with html syntax errors and very bad coding practices. It would be simplest to tear it down and rebuild from scratch after learning how to code html correctly.

Ed Seedhouse

Posting Guidelines

High on a hill, in Wrangellia.

Debayan Gupta
Debayan Gupta's picture
User offline. Last seen 1 year 18 weeks ago. Offline
rank Regular
Regular
Timezone: GMT-4
Joined: 2010-08-10
Posts: 45
Points: 51

hehe..

In my defense, I wrote that _before_ any link/code was posted. Tongue

This website is certainly _not_ a shining example of valid code - however, IE6 _is_ known for its ability to take good code and reduce it to scrap.

webster12345
webster12345's picture
User offline. Last seen 1 year 23 weeks ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2010-07-23
Posts: 25
Points: 35

Hi all I will make some

Hi all

I will make some changes and validate the code, in my defense, im using dreamweaver Tongue

I can see when i validate the site, i get a bunch of errors liek this ' BR" undefined '

Does this mean i have to close the tag with a . The validation service says im using XHTML 1.0 Strict. According to my research you need to close tags when using xhtml, but not when using html only.

Sorry im a bit of a novice so not sure if im 100% right on this.

Ed Seedhouse
Ed Seedhouse's picture
User offline. Last seen 3 weeks 1 day ago. Offline
rank Guru
Guru
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3544
Points: 643

webster12345 wrote: I will

webster12345 wrote:

I will make some changes and validate the code, in my defense, im using dreamweaver

Well, but that's not a defence, it is an admission of guilt...

Mind you it has a decent text editor and as long as you stick to that it's merely far too expensive for a text editor. Letting it layout your code or using the so-called "WYSIWYG" feature on the other hand, is a sin against the web. "WYSIWYG" is a snare and a delusion on the web, because there is no "WYG", there are any number of things you get.

Coding html with a layout in mind is, actually, merely a way to make things much much more complicated than they should be, and for very little if any benefit.

I don't think "making some changes" will really help. What you need is to start over with proper methods. That involves taking some time to learn what good code is and what the best practices are. There is no shortcut to this, really.

Ed Seedhouse

Posting Guidelines

High on a hill, in Wrangellia.