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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.