Jump to content

[SOLVED] Margin not working


daveoffy

Recommended Posts

What kind of spacing are you looking for? Margin is for around borders, padding is within borders, letter-spacing is space between letters, among others. Please be more specific.

<div style="margin: 10px">
Hello World
</div>

This would give you a margin of 10px all around the "Hello World".

<div style="margin-top: 10px">
Hello World
</div>

Would give a margin of 10px from the top only.

All code (http://buyastatus.com/skin/style.php)

 

style.php

<?php include 'header.php'; ?>
<body>
<div align="center">
<div id="wrapper">
<div class="spacer">
	<div id="logo">
		<img src="images/logo.png">
	</div>
</div>
<div id="userbar"></div>
<div id="content"></div>
<?php include 'footer.php'; ?>

2 of the divs close in footer.php

 

style.css

* {
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
background: #3681c1 url(images/bg.gif) repeat-x top left;
font-size: 12px;
}
#wrapper {
text-align: left;
margin: 0px auto;
padding: 0px;
border: 0;
width: 900px;
height: auto;
}
.spacer {
margin-top: 10px;
}
#logo {
width: 335px;
height: 110px;
background-image: url(images/l_bg.png);
float: left;
}
#userbar {
margin-right: 10px;
width: 555px;
height: 35px;
background-image: url(images/ub.png);
float: left;
}
#content {
width: 898px;
background: #FFFFFF url(images/c_bg.gif) repeat-x top left;
border: 1px solid #FFFFFF
}
#footer {
width: 900px;
height: 25px;
background-image: url(images/footer.png);
margin-top: 10px;
}
a:link {
    text-decoration: none;
    color: #000000;
}
a:visited {
    text-decoration: none;
    color: #000000;
}
a:active {
    text-decoration: none;
    color: #000000;
}
img {
border: 0
}

[td][/td]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.