Why images are aligned properly in mozilla but not in IE?

hi all.
i have one web page with logo,and some menu images.
But these are aligned correctly in Mozilla but not in IE new version also.

Give me an idea to overcome this…

Thanking you…

thanks for reply.
once you see the site in mozilla and IE.
WWW.rfdesign.info and suggest me some more…

On seeing the design in Chrome I think, “oh my god this might use tables”. On closer inspection, it definitely does.

Does the page have a doctype? I don’t see one, which means that IE is almost certainly going to default to quirks mode. Yes, Microsoft actually calls it “quirks mode”.

Advice number 1 - validate - http://validator.w3.org/
That’s the number one cause for inconsistency.

When it passes with flying colours I’ll be happy to advise further on this.

Validation is a good tool to locate bad code, and bad code can affect how browsers display.

Fair enough, bad code is bad, but the number 1 cause of browser inconsistencies is the inconsistencies of browsers. Validation is pretty much meaningless (I wish this were not so, but I wish for lots of things I don’t get).

Yeah, I’ll give you that. We can’t do much about the browser problems, apart from trying to avoid them :slight_smile:

There is a problem when some browsers correctly display poor code, and other browsers do not display what is wanted.

At my day job, we have a form that is HTML generated by a program. We have a warning to use IE when displaying the form. The page has several non-break spaces in the form that are not coded properly. Firefox displays something like this:


IE of course displays ONE TWO THREE and everyone is happy except the Firefox users.

I don’t think we want browsers to behave differently when the code is totally hosed, and this is just a simple example of a poorly designed code generating program.

Well, only a little. I’ve seen my fair share of css issues that are not capable of being resolved until proper html code was used.

Okay, we have a difference of opinion then. I’ve been stung one more than one occasion where hours are lost chasing down CSS-related issues, when broken HTML code that was the cause.

And I mean really broken. Five body tags before the head are not unknown, and don’t get me going on copy/pasta curly double quotes!

Advice number 1 - validate - http://validator.w3.org/
That’s the number one cause for inconsistency.

lol, surely you jest?

I agree with Paul - while having valid code won’t guarantee you get the intended rendering in all browsers, it gives you a much better chance of it! And then you tend to be looking at known hacks to fix known bugs, rather than the random and unfathomable problems that come from badly-formed HTML.

Nope, this is actually the cause of the issue (in my warped world view :P).
Browsers do their utmost to silently render what ever the hell you throw at them. This is wrong, but it is the way things are. In most cases, the errors are with the browsers interpretation of the world, not with errors in the code. That is to say, all browsers seem to handle the structural rules properly (errors in markup), but some differ on what styles like “width” mean (errors in browsers).

When it comes to fixing presentation issues relating to the CSS code, isn’t success dramatically improved when HTML errors are not the root cause of the issue?

To a certain degree. The problem is that validation is not meaningful: I can validate my code till the cows come home, but it will still be displayed incorrectly in some browser.

There are around 300 different reasons why images in IE may be aligned differently than in other web browsers.

Can you help us to narrow down the reasons? Such as, providing some test code that demonstrates the problem?