There is definitely an easy response, but I cannot get both divs to center. I used inline blocks, floats and I even tried to use a CSS grid. I need the dollars sign to be separate from the number because I want to have a jQuery effect on the number but if I include the dollar sign it does not recognize it as a number.
I just want both divs to be centered across the screen.
text-align: center; does not seem to work
#dollar_sign { display: inline-block; margin: 0 auto; font-size: 150px; color: rgb(0, 255, 0); } #num { display: inline-block; margin: 0 auto; font-size: 150px; color: rgb(0, 255, 0); } <div id="big_number"> <div id="dollar_sign">$</div> <div id="num">1,000,000</div> </div> <div style="clear: both;"></div>
margin: 0 autoto do it.inline-block, you put thetext-align:centerin the container not the divs themselves.margin: autothe default forinline-blockelements anyway?0, but there is not an actual value assigned to margin, since the inside of an inline-block element is calculated as a block level element, but the outside is computed as an inline element.