Jump to content

Getting columns in a <li>...


RIRedinPA

Recommended Posts

I'm trying to do a layout that has an <ul> with each list item having 3 columns. I have it working somewhat (the first <li> has the items in a column) but then the second <li> is not wrapping beneath the first. Where am I going wrong here?

 

HTML

 

<div class="groupShipAddressTable">
											<div class="groupShipAddressTableWrapper">
												<ul>

													<li class="nameColumn">
														<p>Name</p>
														<p>Type</p>
														<p>Edit</p>
													</li>

													<li class="addressColumn">
														<p>123 Street Street</p>
														<p>City, State Zip</p>
														<p>Country</p>
													</li>

													<li class="phoneColumn">
														<p>Day Phone</p>
														<p>610-555-5555</p>
														<p>Evening Phone</p>
														<p>610-555-5555</p>
													</li>

												</ul>

												<ul>
													<li 
														<p class="nameColumn">
															<p>Name</p>
															<p>Type</p>
															<p>Edit</p>
														</p>

														<p class="addressColumn">
															<p>123 Street Street</p>
															<p>City, State Zip</p>
															<p>Country</p>
														</p>

														<p class="phoneColumn">
															<p>Day Phone</p>
															<p>610-555-5555</p>
															<p>Evening Phone</p>
															<p>610-555-5555</p>
														</p>
													</li>
												</ul>
											</div>
										</div>

 

CSS

 


.groupShip .groupShipAddressBox .groupShipAddressTable 
				{
					background-color: #fff;
					border: 1px solid black;
					float: left; 
					height: 145px;
					margin-left: 20px;
					overflow-y: scroll;
					width: 650px;
				}

					.groupShip .groupShipAddressBox .groupShipAddressTable .groupShipAddressTableWrapper
					{
						width: 625px;
					}							

					.groupShip .groupShipAddressBox .groupShipAddressTable .groupShipAddressTableWrapper li
					{
						overflow: auto; 
						padding: 5px 0px 2px 5px;

					}

						.groupShip .groupShipAddressBox .groupShipAddressTable .groupShipAddressTableWrapper ul li.nameColumn 
						{
							float: left; 
							margin-left: 10px;
							width: 120px;
						}

						.groupShip .groupShipAddressBox .groupShipAddressTable .groupShipAddressTableWrapper ul li.addressColumn 
						{
							float: left; 
							width: 145px;
						}

						.groupShip .groupShipAddressBox .groupShipAddressTable .groupShipAddressTableWrapper ul li.phoneColumn 
						{
							float: left;
							width: 300px;
						}

Link to comment
https://forums.phpfreaks.com/topic/200173-getting-columns-in-a/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.