Jump to content

Absolute Positioning?


Cryzabey
 Share

Recommended Posts

Problem AreaThe values beneath the ticks on the graph currently align decently because the values and size of the text has been figured into the below padding:
<div style='display: inline; float: left; padding-bottom: 5px; padding-left: 34px;'>$110,000</div>

However, if I ever change the text size or remove the "$" sign, then the spacing becomes wrong. Is there a way to attach the text value to a specific x-pixel so that the center of the text is always at that mark? Or at least something along those lines [:

Link to comment
Share on other sites

You could put the dollar values in spans that have an equal percentage share of the width of the parent element, except the first and last that can just be fully left or fully right aligned

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...