Put this at the top of your CSS file:
* { margin: 0; padding: 0; }
hack? or valid CSS? What does it do? and how is it transferred to different browsers / versions?
This is valid CSS. It selects an EVERY element and resets the default field values and paddings. The reason people use this is to make their site layout more consistent across browsers / versions, as each browser has its own default stylesheet. If you do not use this declaration or specify margin / padding for each element, each browser will use its own default paddings / padding for this element, and the page will be displayed inconsistently in different browsers.
http://css-tricks.com/margin-0-padding-0-no-longer-cool/
CSS Reset. . , -, , .
CSS. . . . - , (, , ), , .
. . ( , , 2000 , , .)
Internet Explorer 5.x Macintosh, IE 4.5 Mac, Opera 3.6. Netscape 6 Preview 1 , 3 Opera 4 Windows.
:
* - . CSS 0000, , . , "reset" , .
*
, . . , , .
. div, li .. , , , a span head. , .
div
li
a
span
head
reset HTML, - Eric Meyer Reset CSS. reset CSS , . , . ( body h1, .)
body
h1
html * { margin: 0; padding: 0; }
body * { margin: 0; padding: 0; }
. -, .
, , HTML - . CSS reset.
, CSS.
CSS, .
reset HTML, . reset, , .
. . "css reset"
As tf111 explains, the idea is to get rid of certain browser options for margins and padding, which are different in all browsers.
Source: https://habr.com/ru/post/1708851/More articles:WPF ContextMenu - wpfHow to use VBA to automate multiple Office applications? - vbaHow can I connect to a process in Visual Studio? - debuggingHow to list context / apartments for a COM object? - c ++How it works ? (C ++) - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1708852/performance-related-how-does-sql-server-process-concurrent-queries-from-multiple-connections-from-a-single-net-desktop-application&usg=ALkJrhjMtz7NoxQlRfbhLifPv5wJpIbUdAHow to import unicode xls / csv file into php / mysql? - phpVisual Studio 2008 jQuery IntelliSense спорадически терпит неудачу, перезапуская VS-исправления - javascriptAre we requesting too much transactional memory? - lockinguse of accessories in one class - c ++All Articles