I have run into a problem that I just can't seem to find a solution for. I am trying to have two tags line up with each other horizontally. Each will hold a list.
I would like to move the red box so it is in line with the blue box.
I also need the list centered in the middle of the box (where the line is)
I have tried to achieve aligning the boxes in multiple ways, one of those including "float: left;"
All it seems to do is add some padding to the box.
I have also tried using absolute value and relative positioning, but it either did not scale very well or did not line up.
As for centering the text, I have tried many ways.
I tried using "text-align: center;" but that did not move the dots. The words are also aligned strangely on the blue side.
I also tried using "margin-left: %50;" but that did not center it perfectly, but rather put it too far to the right.
My current code is as follows:
#list {
background: blue;
width: 50%;
}
#list2 {
background: red;
width: 50%;
margin-left: 50%;
}
#ingredients {
text-align: center;
}
#equipment {
text-align: center;
}
<html>
<body>
<div id="list">
<h3 id="ingredients">Ingredients</h3>
<ol>
<li>Bread</li>
<li>Some sort of spread (examples below)
<ul>
<li>Nutella</li>
<li>Penut butter</li>
<li>Jelly</li>
</ul>
</li>
<li>Some common sense</li>
</ol>
</div>
<div id="list2">
<h3 id="equipment">Equipment needed</h3>
<ul>
<li>A toster or toser oven</li>
<li>A knife to spread your spread</li>
</ul>
</div>
</body>
</html>
Any and all help is very appreciated! Thanks, - Riley