Question:
CSS: White space under

?

Bozzo221
2011-03-21 21:42:35 UTC
Hello i am having great difficulty in removing the white space below

.
e.g.

------------


(remove this white space)

---------


(remove this white space)

---------



Here is my CSS:

body {
margin-top:1cm;
margin-right:2.5cm;
margin-bottom:1cm;
margin-left:2.5cm
background-color:#FFFFFF
}

p{
line-height:1.5em; margin-bottom
}

h1{
font:1.4em; verdana; color:000099
}

h2{
font:1.3em; verdana; color:006699
}

h3{
font:1.2em; font-weight:bold; color:black
}

h4{
font:1.0em; text-transform:uppercase; color:999999
}

I have tried adjusting padding and bottom margin.

Im fairly new to this hope im on the right track..
Thanks
Three answers:
2011-03-21 22:04:01 UTC
Interesting you are using centimeters as your units of measure...



First,

body {

margin-top:1cm;

margin-right:2.5cm;

margin-bottom:1cm;

margin-left:2.5cm

background-color:#FFFFFF

}



get rid of cm and use something conventional like pixels or em units http://www.w3schools.com/css/css_units.asp



Next,

h2{

font:1.3em; verdana; color:006699

} You are forgetting color:#006699, you need a '#' to identify a hex color.



Finally, you need to use the margin property to reduce the amount of space around any element...

h1 {

margin:10px 9px 8px 7px; (this equals the following below in order)

margin-top:10px;

margin-right:9px;

margin-bottom:8px;

margin-left:7px;

}



change these values and you will see the results you want.



http://www.atomicpages.net/blog/category/css/css_basics/
?
2016-10-27 06:27:37 UTC
because
is a block element ingredient, seen browsers (e.g. MSIE and Netscape) render
factors with a line damage before and after them. notwithstanding, they don't many times placed an complete sparkling line before and after like a

ingredient.

is known on the area of styles of the ALIGN characteristic to set some sort of result for the content. as an party, think you opt for a block of the web page to be use a diverse font, font shade, and be indented. to attempt this, first placed some sorts regulations contained in the HEAD component to the record: /STYLE those sorts regulations create a sorts type named caution. you are able to then follow the kind to a
ingredient utilising the kind characteristic:
contents of DIV ingredient /DIV
Mit Chauhan
2011-03-21 22:39:56 UTC
try this

-------------------------------





h1



-

h2



-

h3



This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...