Log In · Register

 
Allign Text
funride
post Apr 1 2009, 02:58 PM
Post #1


Funride.org
*****

Group: Member
Posts: 326
Joined: Jul 2007
Member No: 542,299



Okay so here's my code.

CODE
<style type="text/css">

body{background-color: #000000;
color: #ffffff;
font-family: arial;
font-size: 12px;}

#content{
position: absolute;
overflow: hidden;
top: 315px;
left: 140px;
width: 301px}

#banner{
position: absolute;
top: 05px;
left: 140px;
width: 301px}

</style>

<div id="banner">
<img src="http://i42.tinypic.com/2czes9g.png">
</div>


<div id="content">
<center><h1>Heading here</h1></center>
<center>Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. </center>
</div>


Can someone help me allign the text to be in between the stars, because I just had to center the header, but the main text wont go in the middle.
 
 
Start new topic
Replies (1 - 4)
newkidontheblock
post Apr 1 2009, 03:15 PM
Post #2


Offline.
*****

Group: Official Designer
Posts: 609
Joined: Mar 2007
Member No: 507,591



I hope this helped.
CODE
<style type="text/css">
body {
background-color: #000000;
color: #ffffff;
font-family: arial;
font-size: 12px;
}

#container {
background-image: url('http://i42.tinypic.com/2czes9g.png');
position: relative;
margin: 20px auto;
height: 500px;
width: 355px;
}

#content{
position: absolute;
overflow: hidden;
width: 285px;
top: 315px;
left: 35px;
}
</style>
<div id="container" >
<div id="content" >
<h1> Donec non lacus eu </h1>
<p> odio fringilla interdum. Cras et nibh vitae erat feugiat placerat. In hendrerit ligula non lacus. Curabitur porttitor. Nullam id sem. Donec non velit in magna auctor dapibus. Phasellus quam. Praesent sollicitudin augue ut quam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc lorem. Sed vel massa sed est volutpat laoreet. Mauris enim. Nunc tempor. Donec aliquet. </p>
</div>
</div>
 
mipadi
post Apr 1 2009, 03:18 PM
Post #3


Senior Member
******

Group: Administrator
Posts: 2,648
Joined: Apr 2008
Member No: 639,265



I played around with it a bit and ended up with this:

HTML
<style type="text/css">

body{background-color: #000000;
color: #ffffff;
font-family: arial;
font-size: 12px;}

#content{
position: absolute;
overflow: hidden;
top: 315px;
left: 140px;
width: 301px}

#banner{
position: absolute;
top: 05px;
left: 140px;
width: 301px}

#content h1 { margin-left: 40px;
text-align: center; }
#content p { margin-left: 40px;
width: 259px; }

</style>

<div id="banner">
<img src="http://i42.tinypic.com/2czes9g.png">
</div>


<div id="content">
<h1>Heading here</h1>
<p>Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words. Words words words words words.</p>
</div>
 
funride
post Apr 1 2009, 03:25 PM
Post #4


Funride.org
*****

Group: Member
Posts: 326
Joined: Jul 2007
Member No: 542,299



Thank you.
 
Mickey
post Apr 1 2009, 03:35 PM
Post #5


Treasure Pleasure
********

Group: Head Staff
Posts: 11,193
Joined: Oct 2005
Member No: 281,127



Topic closed & moved.
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: