PDA

View Full Version : looks right in firefox, but not IE!



Nubblet
Mar 29th, 2010, 04:04 PM
Hey all.

Im coding a website, using a table layout, and i have it pretty much where i want it except that i can't figure out how to get one page looking correct in IE. I have managed to iron out most of the other conflicts so far, but this one is really bugging me.

Hard to explain the problem in words, so i'll attach some pictures. I can also attach a txt file with my code and css if needed.

Any help would be much appreciated!

abduraooft
Mar 29th, 2010, 04:11 PM
Hard to explain the problem in words, so i'll attach some pictures. I can also attach a txt file with my code and css if needed. You should post your code or a link to your page would be much better (you may make use of any free hosts like freehostia.com. if required).

PS: Validate your code (http://validator.w3.org/#validate_by_input) often while development!

Nubblet
Mar 29th, 2010, 04:18 PM
You should post your code or a link to your page would be much better (you may make use of any free hosts like freehostia.com. if required).

PS: Validate your code (http://validator.w3.org/#validate_by_input) often while development!

I intended to validate it all once i had the layout under wraps and the main things done, as such the code im about to attach wont validate under a 1.0 strict dtd, but i was going to fix that later.

here is the code and css

abduraooft
Mar 29th, 2010, 04:30 PM
as such the code im about to attach wont validate under a 1.0 strict dtd, but i was going to fix that later.
Later? See, to expect a cross browser compatible display, you need to supply a valid markup to them first. Read http://validator.w3.org/docs/help.html#validation_basics

From your code, I'd recommend to remove the part
<?xml version="1.0" encoding="utf-8"?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" and then add the following at the top.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

drhowarddrfine
Mar 29th, 2010, 08:01 PM
His doctype is correct, though spaced out. New pages should never use transitional, though.

Nubblet
Mar 30th, 2010, 01:34 PM
His doctype is correct, though spaced out. New pages should never use transitional, though.

Yes, i learned to code in xhtml 1 strict, so i always intended to keep using 1.0 strict. I've been using dreamweaver for most of it so far, to save time...but of course alot of the code dreamweaver puts in wont validate under 1.0 strict, but i fix those little things as i go.

im still relatively new to the coding scene, but im pretty sure that the doctype has no effect on how the browser reads the code anyway? I've wracked my brains as to why explorer is putting that big gap above my images, and im thinking its got something to do with the height of that particular cell in the table, but ive tried giving it a specific height, but it has no effect.

abduraooft
Mar 30th, 2010, 01:48 PM
Yes, i learned to code in xhtml 1 strict, so i always intended to keep using 1.0 strict. I've been using dreamweaver for most of it so far, to save time...but of course alot of the code dreamweaver puts in wont validate under 1.0 strict
I prefer a strict DOCTYPE, but the reason why I suggested a transitional one is that your code wasn't perfect to use a strict doctype, and thus you might have got more issues with a correct strict doctype.
Moreover, the doctype in your current page is broken!

im still relatively new to the coding scene, but im pretty sure that the doctype has no effect on how the browser reads the code anyway? That's wrong, see http://www.alistapart.com/articles/doctype

drhowarddrfine
Mar 30th, 2010, 02:51 PM
@abduraooft is correct. Doctypes are required in modern web page markup. Transitional is used when transitioning older pages that use deprecated markup, but new pages should never use deprecated markup. XHTML doctypes are for pages to be served as XHTML but almost no one does that, including you. Therefore a HTML strict doctype is the only one that makes sense though abduraooft says he saw something in your markup indicating transitional is more appropriate.

Nubblet
Mar 30th, 2010, 06:23 PM
thanks for the replies guys. I see your point/s on the doctypes...i guess it does make sense to change to transitional. But a while back i did try changing the doctype to see if that affected the problem i'm having in IE, and it i couldnt see any changes at all. Which is why i said i was pretty sure it had no effect.