Reputation: 117
Please log into my website using:
username: test password: test
and then go to http://www.budgie.richardcmpage.com/profile.php
I'm trying to get the profile info (only the top part, ignore the bottom forms) in the centre of the page but it's not quite right.
<div id="profile_bg">
<h1>Profile</h1>
<div class="middle">
<ul class="headers">
<li>Username: <span class="output_username"> <?php echo $username ?></span> </li>
<li>Full Name: <span class="output_fullname"><?php echo $fullname ?></span> </li>
<li>Email Address: <span class="output_email"><?php echo $email ?></span> </li>
<li>Location: <span class="output_location"><?php echo $location ?></span> </li>
<li>Country: <span class="output_country"><?php echo $country ?></span> </li>
</ul>
</div>
</div>
CSS
#profile_bg{
display:block;
margin-left:auto;
margin-right:auto;
width:600px;
height:800px;
background-color:#42592C;
font-size:13px;
}
.middle{
display:block;
margin-left:auto;
margin-right:auto;
width:280px;
height:110px;
}
.headers {
list-style:none;
margin-top:10px;
}
Upvotes: 0
Views: 62
Reputation: 114367
I'm not sure if this is what you mean, but it will center it.
.headers {
list-style:none;
margin-top:10px;
text-align:center;
}
Upvotes: 1