Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-06-2010, 07:25 PM   PM User | #1
DjDanHayden
New Coder

 
DjDanHayden's Avatar
 
Join Date: Nov 2008
Location: Ireland
Posts: 43
Thanks: 16
Thanked 0 Times in 0 Posts
DjDanHayden is an unknown quantity at this point
Help Needed Please

Hi everyone..

Here is my website : http://battlestation.info/home/index.php


As you can see im working on the css, but im stuck and need your help.

Look about halfway down the page there is 3 usernames and avatars, they are going below one another and i need them to go beside one another and across the black box. (I know, Basic but i just cant get it lol)

Here is the html and css

Html/php:

PHP Code:
<div id="newpeople"><div class="marg">

  <div class="padd">
<?
$con 
$db->query("SELECT * FROM " TABLE_PREFIX "user ORDER BY userid DESC LIMIT 0,5");
    while(
$newusers $db->fetch_array($con))
    {


$getavatar=mysql_query("SELECT * FROM " TABLE_PREFIX "customavatar WHERE userid='$newusers[userid]'");
$getavatar=mysql_fetch_array($getavatar);

if(
$getavatar[userid]){
$avatar="./image.php?u=$newusers[userid]&dateline=$getavatar[dateline]&type=thumb";
} else {
$avatar="./theme/images/noavatar.jpg";
}

    echo 
"<div class='people'><a href='./member.php?u=$newusers[userid]'><img height='60' width='60' src='$avatar' alt=''><span>$newusers[username]</span></a></div>";
}



?>
  </div>
</div></div>


CSS:
Quote:

#newpeople {position:absolute; top:785px; left:396px; width:899px; height:110px; background:transparent url(/home/theme/images/bg_newpeople.gif) repeat top left;}

#newpeople .marg {margin:7px 10px 10px 7px;}

#newpeople .padd {position:absolute; top:10px; left:10px; padding:10px 0; background:transparent url(/home/theme/images/bg_roundedtop.gif) no-repeat top left;}

#newpeople .people {margin-bottom:5px;}

#newpeople .people img {padding:5px;}

#newpeople .people a:link, #newpeople .people a:active, #newpeople .people a:visited {color:#EEC201;}

#newpeople .people a:hover {text-decoration:underline;}

#newpeople span {display:block; clear:both;}

Thanks in advance, and thats to whoever helps
DjDanHayden is offline   Reply With Quote
Old 08-06-2010, 08:14 PM   PM User | #2
skywalker2208
Regular Coder

 
Join Date: Jan 2009
Posts: 193
Thanks: 0
Thanked 20 Times in 20 Posts
skywalker2208 is an unknown quantity at this point
When I click the link it asks for a username and password to access the site.
skywalker2208 is offline   Reply With Quote
Users who have thanked skywalker2208 for this post:
DjDanHayden (08-06-2010)
Old 08-06-2010, 08:23 PM   PM User | #3
DjDanHayden
New Coder

 
DjDanHayden's Avatar
 
Join Date: Nov 2008
Location: Ireland
Posts: 43
Thanks: 16
Thanked 0 Times in 0 Posts
DjDanHayden is an unknown quantity at this point
Oh yea sorry...

Try now...
DjDanHayden is offline   Reply With Quote
Old 08-06-2010, 08:35 PM   PM User | #4
skywalker2208
Regular Coder

 
Join Date: Jan 2009
Posts: 193
Thanks: 0
Thanked 20 Times in 20 Posts
skywalker2208 is an unknown quantity at this point
Add a float: left to the css below.

Code:
#newpeople .people {
margin-bottom:5px;
}
I would also suggest to not use position, top, left, right and bottom for designing page layouts.
skywalker2208 is offline   Reply With Quote
Users who have thanked skywalker2208 for this post:
DjDanHayden (08-06-2010)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:00 AM.


Advertisement
Log in to turn off these ads.