Gang,
My subject is not quiet what I am looking for. I have a
container div with two ul's inside. I am trying to get the two ul's
to be side-by-side instead of one on top of the other. I have tried
applying the float declaration on the ul's, but that either makes them
line up to the left and if I align to the right, the two lists are
displayed backwards. I would like to keep the code as bare as
possible without encasing the ul's inside so other container (ie div
or span). I have also tried using the text-align property on the
container div, but that doesn't seem to work either. Any help with
the code below would be great. Thanks in advance.
<html>
<style>
#wrapper {
margin: 0px;
padding: 0px;
text-align: right; /* attempt to align the ul's to the right */
width: 400px;
border: 1px solid red;
}
#col1 {
list-style: none;
text-decoration: none;
border: 1px solid black;
text-align: left;
width: 100px;
}
#col2 {
list-style: none;
text-decoration: none;
border: 1px solid green;
text-align: left;
width: 100px;
}
</style>
<body>
<div id="wrapper">
<ul id="col1">
<li>asdf</li>
<li>zxcv</li>
<li>qerw</li>
<li>asdf</li>
</ul>
<ul id="col2">
<li>1234</li>
<li>5678</li>
<li>9012</li>
<li>3456</li>
</ul>
</div>
</body>
</html>
My subject is not quiet what I am looking for. I have a
container div with two ul's inside. I am trying to get the two ul's
to be side-by-side instead of one on top of the other. I have tried
applying the float declaration on the ul's, but that either makes them
line up to the left and if I align to the right, the two lists are
displayed backwards. I would like to keep the code as bare as
possible without encasing the ul's inside so other container (ie div
or span). I have also tried using the text-align property on the
container div, but that doesn't seem to work either. Any help with
the code below would be great. Thanks in advance.
<html>
<style>
#wrapper {
margin: 0px;
padding: 0px;
text-align: right; /* attempt to align the ul's to the right */
width: 400px;
border: 1px solid red;
}
#col1 {
list-style: none;
text-decoration: none;
border: 1px solid black;
text-align: left;
width: 100px;
}
#col2 {
list-style: none;
text-decoration: none;
border: 1px solid green;
text-align: left;
width: 100px;
}
</style>
<body>
<div id="wrapper">
<ul id="col1">
<li>asdf</li>
<li>zxcv</li>
<li>qerw</li>
<li>asdf</li>
</ul>
<ul id="col2">
<li>1234</li>
<li>5678</li>
<li>9012</li>
<li>3456</li>
</ul>
</div>
</body>
</html>
Comment