can anyone please let me know ....whts the basic reason that the same HTML codes gives some sort of a difference when opened with IE and MOZILLA... or other browsers ... please dont say that certain tags behave differently in the various browsers....

Recommended Answers

All 4 Replies

Hi,
The truth is that the browsers all render the pages slightly differently. They are meant to adhere to the HTML specifications but most browsers will not follow the specs in exactly the same way. You should have been around 5 years ago, things were a mess...

For example the amount of padding that IE gives to a UL might be different than what FF does, hence a slightly different feel. You might want to have a look at the ACID2 test. Its a rendering test that browsers should pass to be considered standards compliant. The results are interesting...

Hope that helps,

thats why i dread coding in HTML n so my seniors scold me at times... by the way please tell me a way so that the output remains almost the same...there might be a way???????????? or else.. there might be certain tags which we should not use..or at least avoid??????????

Most of the browser differences can be remedied (at least visually), using a good css reset. If you writing only html, some default styling can change.
If your using non-depreciated tags, and you wish to add back the same amount of padding etc., consider using an reset like Eric Myer's or a simple *{margin:0;padding:0;} .
Do you have an example of what you are talking about?
Most often, you can mae the page look similar, but not the same.

try this on ur html source..
(Edit ur html using 'notepad')
Add the DIV flag right after 'BODY''

<BODY>
<DIV STYLE="position: absolute; left: 2px; top:2px; width: 1000px; height: 800px;">
 

then put  /DIV flag before the /BODY


</DIV>
</BODY>
</HTML>

Hope this will help u with ur problems about ur site on diffrt Browser..
The DIV code will hold ur intire script in place, on the page.

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.