View Single Post
Old 11-18-2012, 09:35 AM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello comport9,
Looks like you and Windbrand are in the same class?

Your ul's are left aligned because that's what you told them to do. You can't center them and float them left, not without some margin or padding to push them toward the center and then that messes up the layout when they drop.

Look at that solution for Windbrands question, or this -
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
html, body {
	margin: 0;
	background: #fc6;
}
#wrapper {
	padding: 10px 10px 50px;
	text-align: center;
	background: #333;
}
.ul {
	width: 400px;
	height: 250px;
	display: inline-block;
	text-align: left;
	border: 1px solid red;
}
</style>
<title>test</title>
</head>
<body>
	<div id='wrapper'>
		<ul class='ul'>
			<li class='link'>One1</li>
			<li class='link'>One2</li>
			<li class='link'>One3</li>
			<li class='link'>One4</li>
		</ul>
		<ul class='ul'>
			<li class='link'>One5</li>
			<li class='link'>One6</li>
			<li class='link'>One7</li>
			<li class='link'>One8</li>
		</ul>
		<ul class='ul'>
			<li class='link'>One9</li>
			<li class='link'>One10</li>
		</ul>
		<ul class='ul'>
			<li class='link'>One11</li>
			<li class='link'>One12</li>
			<li class='link'>One13</li>
			<li class='link'>One14</li>
		</ul>
		<ul class='ul'>
			<li class='link'>One15</li>
			<li class='link'>One16</li>
			<li class='link'>One17</li>
			<li class='link'>One18</li>
		</ul>
	</div>
</body>
</html>
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
comport9 (11-18-2012)