• 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!

Website

dydocan

dydocan
Joined
Jul 2, 2010
Messages
95
Reaction score
0
Hi, I have 2 websites linked to 1 website.

I had it in html but now I want it in PHP because html is just messing it up but here is the html code I had>>

<html>
<body style="background-image:url('main/bam.png');" />

<div style="padding-left: 180px;" style="padding-top: 100px;"/>
<a href="127.0.0.1/bakla"/>
<img src="main/tang.png" alt="HighRated"/>
</a>
</div>

<div style="padding-left: 380px;" style="padding-top: 100px;"/>
<a href="127.0.0.1/tabkla"/>
<img src="main/tang.png" alt="HighRated"/>
</a>
</div>

</body>
</html>

when I have 1 button it is working fine but when I have 2 buttons I can't control it it just places the button where ever it wants :O
 
Stop asking the same thing twice... ->Link to your older post<-

It doesn't matter if you use PHP or XHTML if you just want to position your buttons... I fixed your XHTML code and edited it a little bit, you can edit the button positions in the css area.

Code:
<html>
<head>
<title>Title for your site</title>

<style type="text/css">
body {
	background:	url('main/bam.png');
}

.button1 {
	margin:		100px 0 0 180px;
	display:	block;
	float:		left; <!-- Remove if you dont want the buttons to be in same line. -->
}

.button2 {
	margin:		100px 0 0 180px;
	display:	block;
	float:		left; <!-- Remove if you dont want the buttons to be in same line. -->
}
</style>

</head>
<body >
	<div class="button1">
		<a href="127.0.0.1/bakla"><img src="main/tang.png" alt="HighRated"/></a>
	</div>

	<div class="button2">
		<a href="127.0.0.1/tabkla"><img src="main/tang.png" alt="HighRated"/></a>
	</div>
</body>
</html>
 
And I still got the same problem as before

when I set margin at 290 at both they aren't on same line the first one are on the middle on the page and the second one is at bottom at the page, it is still messing it up -.-

.button1 {
margin: 290px 0 0 180px;
display: block;
float: left; <!-- Remove if you dont want the buttons to be in same line. -->
}

.button2 {
margin: 290px 0 0 180px;
display: block;
float: left; <!-- Remove if you dont want the buttons to be in same line. -->
}
 
I centered the buttons and but them kinda like they were on your example site.
Code:
<html>
<head>
<title>Title for your site</title>

<style type="text/css">
body {
	background:	url('main/bam.png');
}

#main {
	margin: 	0 auto;
	display:	block;
	width:		600px;
	text-align: center;
}

.button1 {
	margin:		250px 0 0 0;
	display:	block;
}

.button2 {
	margin:		5px 0 0 0;
	display:	block;
}

</style>

</head>
<body >
<div id="main">
	<div class="button1">
		<a href="127.0.0.1/bakla"><img src="main/tang.png" alt="HighRated"/></a>
	</div>

	<div class="button2">
		<a href="127.0.0.1/tabkla"><img src="main/tang.png" alt="HighRated"/></a>
	</div>
</div>
</body>
</html>

You can learn here about the CSS more, if you need to modify it more... WC3School - CSS
 
Last edited:
Back
Top