Latest Lists

How do I make a left - to - right list in html?

Like an image on the left, a space in the middle, and then an image on the right? Dont say its <li></li> tags because ive tried that =]

Public Comments

  1. you can do that with lis, the key is in styling them properly... here's the hello world: <style> ul.special li { display:inline; } </style> <ul class="special"> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> this will get the items side-by-side. from there, you might want to add some padding. if you want characters in between, you can probably style each list item individualy with different background images. or you can encode character code like " | " ... or maybe even use borders, but borders are a bit trickier.
  2. Please use this code for that ,,,thanks u can use classes for this thing, its easier for you to control data using style sheet, thankz <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <!--style for the page starts here--> <style> body { font-family:"Courier New", Courier, monospace; font-size:12px; } .main { width:990px; margin:0px auto; } .listarea { width:300px; float:left; padding:5px; } h2 { font-size:14px; font-weight:bold; color:#666; } </style> <!--style for the page ends here--> </head> <body> <div class="main"> <!--listing the content using classes--> <h2>listing the content using classes</h2> <div class="listarea">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,</div> <div class="listarea"> <img src="http://designeruae.files.wordpress.com/2008/09/two1.jpg " align="right" width="300" height="300" /> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text </div> <div class="listarea">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,</div> <!--list the content using classes--> <div class="spacer"></div> </div> </body> </html>
Powered by Yahoo! Answers