Home html Site Cap: Remove the indent from above

Site Cap: Remove the indent from above

Author

Date

Category

Here is CSS to the

element

# Head {
 Padding: 0;
 margin: 0;
 Display: Block;
 HEIGHT: 100px;
 Background-Color: # 3366CC;
}

How to remove the upper indent?


Answer 1, Authority 100%

like this:

body {
 margin: 0;
}

http://jsbin.com/opomek/1/edit

Full version with Normalized.css


Answer 2, Authority 38%

* {
 margin: 0;
 Padding: 0;
}

Somehow so, I think it is possible.


Answer 3

Another bug met: if the first element in the ‘Header’ block is set to the Margin-Top property, it can pull the entire block. To avoid this, you need to set the upper indent of the first element ‘padding-top’ instead of ‘margin-top’.


Answer 4

My mistake was due to such code

. Header H1 {
Padding-TOP: 25px; / * Indent from the top edge of the block * /
Margin-Bottom: -20px; / * Distance between title and ordinary text * /}

missed comma when grouping in the CSS file. Styles belonged to the fonts inside the Header. Corrected the situation: .Header, H1 {...}

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions