Cross browser display

I am testing a website in Chrome, Firefox and Internet Explorer using the following in a CSS file.

#foot_links1, #foot_links2, #foot_links3 {
    position: absolute;
    margin-top: 55px;
    margin-top: 14em;
    color: #02102f;
    font-family: Arial;
}

#foot_links1 {
    left: 335px;
}

#foot_links2 {
    left: 630px;
}

#foot_links3 {
    left: 830px;
}

foot_links1, foot_links2And foot_links3all are in the same line, but catering accommodation foot_links1, foot_links2, foot_links3depending on the browser.

How can i fix this?

+3
source share
5 answers

I suggest using a reset style sheet .

A reset stylesheet will reduce browser inconsistencies such as line heights, margins, and default font sizes.

You can also check the following articles for further reading:

+5

, :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Internet Explorer Internet Explorer 7

, :

body *{
    padding:0;
    margin:0;
}

( , , CSS, rute, .)

+1

doctype , http://validator.w3.org/

doctype xhtml transitional html 4 strict (html 4 IE -)

reset - , , , kbs ( , - css), , , CSS, .

, - , , , ?

0

, . IE8 Opera, - . , ( ). :

   margin-top: 1em;
   top: 55px;

But, as a rule, it is not a good idea to try and get a specific look. The web page is not print media. Users have different preferences, different display devices, and they do not have all the same fonts, etc. Installed.

0
source

While what other people have suggested is good advice as a direct answer to your question, use padding-top instead of margin-top and make sure your divs are set to height. It should be very close, or all there.

0
source

Source: https://habr.com/ru/post/1732730/


All Articles