The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › cant align divs!
please view my jsfiddle:
i am having 2 issues,
1) the two .buttons i cant get to center align inside their parent container #button_container.
2) i want the red border of the #button_container to go around the two .button elements
Possibly what you’re looking for?
If you want centering…don’t use float:left.
Use display:inline-block on the children and text-align:center on the parent.
Also, you don’t have to use clearwith inline-block..which is nice.