Hi everyone,

I built a site in Internet Explorer, and it looks very different in firefox and mozilla. For example, the header is displaced, and the layers look displaced, and the does not seem to work, etc. It's really annoying.

What is the best way to change the whole website to make it compatible with all browsers?

Below are the examples:

Internet Explorer:

Mozilla/Firefox:

Thanks a lot!!!

Just two notes:

It's Mozilla Firefox, not Firefox and Mozilla. One browser. Compound noun. ;-)


</br>? That isn't an HTML tag, is it? The linebreak syntax is an empty tag, meaning there is no end tag to it.

You should go ahead and learn xHTML if you are learning HTML. It's not much different, and it's becoming the Web Standard. Anyways, use <br /> as a linebreak. (Or, just <br> if you'd like to be an infidel)

Secondly, I bet that you coded it while testing it in Mozilla (or IE), without checking. The problem could lie anywhere in your coding, so you would best be up to re-coding it, while checking it in both browsers (add Safari, as well. Just to be sure. Don't forget those awful Mac Users, :-))

Browsers render code in different fashions. There are many variables. OS (Linux, XP, Mac), broswer (Opera, Safari, Mozilla, IE), screen size, and many more.

Anyways, when you can't figure it out, code it for IE. Microsoft has a monopoly on computers, and those come with IE. (~85% of computer users use IE, I believe. I saw that statistic a long time ago, it's probably less with Firefox, and soon to be even less with Google Chrome. [BTW, Chrome is Google's new web browser. It's open source, so get your hands on it.])

I think your best bet would to just recode it, checking in different browsers as you go. Then you can easily pinpoint your errors.

Hi, Are you writing your Website in HTML or XHTML? </br> is not a recognized tag in either language I think you meant to put

<br />

that will fix one of your problems. One problem with only using IE is that IE is to leniant on coding it allows a lot of errors so I use at least 2 to 4 different browsers to check my sites in to make sure it is compliant.

I tried to validate, but it would not do it because my main file is in a php format. It's index.php. It says: Sorry, I am unable to validate this document because its content type is application/x-php, which is not currently supported by this service.

The Content-Type header is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as ".html") to MIME Content-Type values (such as text/html).

shouldn't do that. try and switch the site to html just to view the errors and get back to us. then we could help... as stated above </br> is not a break...ie wouldn't know what to do there so it dismisses it. <br /> is correct, and you should first switch your incorrect breaks with the correct ones. Oh to switch it to html just go look at the source code when viewing the site in the web browser and copy paste it, and save it, then validate it (there is a way to validate files on your computer before you put them up on the web). fix the errors, then if it still doesn't work post the code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.