Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

padding in CSS 1

Status
Not open for further replies.

andycape

Programmer
Aug 22, 2003
177
ZA
I am using padding 0; in my style sheet for body but I have a picture in the top right corner that is going all the way to the top but is leaving a 2-3 mm gap on the left no matter what I do.

Is there a way to force the left padding to be 0 ?

(I even put a leftmargin=0 tag in the body tag which didnt fix it ?)

thanx.
 
Usually browsers render body with margins instead of padding. In Opera, <body> tag also has a padding set and in IE and Mozilla it is margin. To get rid of the gutter, it is best to change both to zero (to ensure cross browser compatibilty):
Code:
<style type="text/css">
 body {
  margin: 0;
  padding: 0;
 }
</style>
 

Although it doesn't matter too much when using "0", you should really specify the units for measurement, too:

Code:
<style type="text/css">
body {
  margin: 0px;
  padding: 0px;
}
</style>

Dan
 
I do have that in my external css sheet, maybe I'll try using it in the page itself ?

thanx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top