NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page [html/css] horizontal list

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Reply
 
LinkBack Thread Tools
Old 07-09-2009, 04:04 AM THREAD STARTER               #1 (permalink)
The original NP Emo Kid
 
liam_d's Avatar
Join Date: Jan 2005
Location: Plymouth, UK
Posts: 1,693
liam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to all
 




[html/css] horizontal list


Hi all i am having problems making a horizontal list.

It works fine if i have say an avatar or a name so
*name *name *name etc

But if i have say
*avatar *avatar
*name *name

With the avatar and name seperated by a "<br />" then it will mess up the next list item .

My code is as follows (without the br):
Code:
		<ul id="friendslist">
		
			<li><img src="http://forum.prxa.info//images/noavatar.gif" alt="avatar" />
			<a href="profile.php?info=8">Tom1</a>
			</li>
			 
			<li><img src="http://forum.prxa.info//images/noavatar.gif" alt="avatar" />
			<a href="profile.php?info=29">Psybadek</a>
			</li>

			 
			<li><img src="http://forum.prxa.info//images/noavatar.gif" alt="avatar" />
			<a href="profile.php?info=14">haseeb</a>
			</li>
			
		</ul>
Code:
#friendslist

{

	padding:0;

	margin:0;

	white-space:nowrap;

	list-style-type:none;

}



#friendslist li 

{

	display:inline;

}
What am i doing wrong?
Last edited by liam_d; 07-09-2009 at 04:06 AM. Reason: missed the title lol
liam_d is offline   Reply With Quote
Old 07-09-2009, 09:56 AM   #2 (permalink)
Programming Genius

 
djdeth's Avatar
Join Date: Aug 2003
Location: Las Vegas
Posts: 949
djdeth is a name known to alldjdeth is a name known to alldjdeth is a name known to alldjdeth is a name known to alldjdeth is a name known to alldjdeth is a name known to all
 



Baby Health Adoption Protect Our Planet Animal Cruelty
Try this

Code:
<ul id="friendslist">
		
			<li><img src="http://forum.prxa.info//images/noavatar.gif" alt="avatar" /><br />

			<a href="profile.php?info=8">Tom1</a>
			</li>
			 
			<li><img src="http://forum.prxa.info//images/noavatar.gif" alt="avatar" /><br />
			<a href="profile.php?info=29">Psybadek</a>
			</li>

			 
			<li><img src="http://forum.prxa.info//images/noavatar.gif" alt="avatar" /><br />
			<a href="profile.php?info=14">haseeb</a>
			</li>
			
</ul>
And for the CSS
????: NamePros.com http://www.namepros.com/programming/595331-html-css-horizontal-list.html

Code:
#friendslist

{

	padding:0;

	margin:0;

	white-space:nowrap;

	list-style-type:none;
	float:left;

}



#friendslist li 

{
float:left;
	display:inline;
	padding:10px;

}
You need to have the float:left; property.
djdeth is offline   Reply With Quote
Old 07-09-2009, 03:24 PM THREAD STARTER               #3 (permalink)
The original NP Emo Kid
 
liam_d's Avatar
Join Date: Jan 2005
Location: Plymouth, UK
Posts: 1,693
liam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to all
 




while that works for the stacking, it seems to put the menu in the div below it?
Last edited by liam_d; 07-09-2009 at 03:36 PM.
liam_d is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HTML/CSS] Calm 2.0 Corporate [4 day auction, wordpress included] DylanButler Web Designs For Sale 0 06-12-2007 11:07 PM
[HTML/CSS] "Corporate Blue" Wordpress Layout + Subpage DylanButler Web Designs For Sale 1 06-10-2007 02:12 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:08 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger