html - two lists side by side -
i can't 2 lists sit side side. second list sites below first list. need different divs because colored , populated differently. list long , populated through js can't build lists position relative
html
<div id="left_list"> <div id="item_name"> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> </div> </div> <div id="item"> <ul> <li>some name</li> <li>some name</li> <li>some name</li> <ul> </div>
css
#item_name { color: #0000ff; font-size: 17px; height: 100%; margin: 0; padding: 0; white-space: nowrap; width: 208px; text-align:right; } #item_name li{ padding-bottom: 0px; } #item { margin-left: 208px; padding: 0; font-size: 17px; white-space: nowrap; background-color: red; } #item li{ list-style-type: none; } #left_list { background-color: #cdcdcd; width: 208px; } ul { list-style-type: none; margin: 0; padding: 0; display: inline-block; *display: inline; margin-right: 22px; }
css
#left_list { background-color: #cdcdcd; float: left; /* add new style in css*/ width: 208px; }
Comments
Post a Comment