• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved [Css]

Status
Not open for further replies.

Peroxide

Gone since January 2018
Senator
Joined
Aug 22, 2008
Messages
10,477
Reaction score
2,421
Location
New Zealand
Having a small issue trying to get something to where I want it to go..

Html code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<title>Test</title>
</head>
<body>
<center><div class="Body" />
  <img src="http://otland.net/images/FrontPageNav.png" class="divSettings" /><img src="http://otland.net/images/background.png" class="body" /></div>
</center>

<center><div class="divSettings" />
</div>
</center>  



</body>
</html>


CSS Code
Code:
@charset "utf-8";
/* CSS Document */


.divSettings {
    top: 50%;
    left: 25%;
    right: 25%;
    float: left;
}

.Body {
    background-position:center;
    background-image:url(images/background.png);
    background-repeat:repeat-y;
}

Problem:
b5maol.png


What I want:

2w1unbq.png
 
Last edited by a moderator:
Delete the class Body and do this:

Code:
	body {
		background-position:center;
		background-image:url('images/background.png');
		background-repeat:repeat-y;
	}

Now remove the other stuff as well, and add this:

Code:
#wrap {
		margin:0 auto;
		width:AMOUNTpx;
	}

Change 'AMOUNT' to your convenience. ( this will align the website content automatically ). Now, you will be able to know what wrong.

Your .html <body> part should look like this:
HTML:
<body>

<div id="wrap">

content here

</div>

</body>

BTW, it's Português.
 
Status
Not open for further replies.
Back
Top