HTML CSS examples for CSS Layout:Text
Align two lines of text using LI list
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .showPosts {<!-- w w w . j av a 2s. com--> cursor:pointer; list-style-type:none; width:201px; } .greekCross { color:Chartreuse; font-size:16px; width:2.6em; float:left; } .showPosts>h5 { font-size:16px; margin-left:2.6em; } </style> </head> <body> <ul> <li class="showPosts"> <span class="greekCross">A</span> <h5>test test test test test test test test </h5> </li> <li class="showPosts"> <span class="greekCross">B</span> <h5>test test test test test test test test </h5> </li> <li class="showPosts"> <span class="greekCross">C</span> <h5>test test test test test test test test </h5> </li> </ul> </body> </html>