Lists and styling lists

 
Post new topic   Reply to topic    34SP.com Forum Index // Web Design
View previous topic :: View next topic  
Author Message
Spanner
Junior Member
Junior Member


Joined: 19 Oct 2004
Posts: 114
Location: Essex, UK

PostPosted: Mon Mar 31, 2008 9:06 pm    Post subject: Lists and styling lists Reply with quote
is there away to style an un ordered list like a table?

Im trying not to use tables but i cant see an alternative for what i want.

Mike
_________________
Help SAVE East Winch!!!!!!!!!!!!!!!

Please help us save our local community:

For more information then please read here
http://www.saveeastwinch.blogspot.com/

Please SIGN the PETIRION here
http://petitions.pm.gov.uk/East-Winch/
Back to top
View user's profile Send private message Visit poster's website
PeteBlacker
34SP Newbie
34SP Newbie


Joined: 25 Jul 2005
Posts: 36

PostPosted: Tue Jul 08, 2008 2:10 am    Post subject: Reply with quote
Not sure exactly what you need to do. Do you need the positioning rules of table rows and table cells. or do you just need to mimic the look of a table using a css style?

You can change the style of a <ul> element using the code below:

Code:
<html>
<head>
<style type="text/css">
<!--
.mylist li {
   text-align:center;
   list-style-type: none;
   display: block;
   width:100px;
   padding:4px;
   margin:2px;
   border:1px solid black;
}
-->
</style>
</head>
<body>

<ul class="mylist">
<li>hello</li>
<li>there</li>
<li>what?</li>
</ul>

</body>
</html>


this will make the list appear like a table. It's being layed out with the default positioning of a div element (block positioning).

Hope this helps.

Pete
_________________
--------------------------------
Hi Tech and Low Tech, Combined.

http://www.EcoVans.com
Back to top
View user's profile Send private message Visit poster's website
Post new topic   Reply to topic    34SP.com Forum Index // Web Design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2002 phpBB Group