CaptainChainsaw Posted October 16, 2012 Share Posted October 16, 2012 Hi all, I'm trying to get the text "Borrow:", "+ Interest:" and "= You repay*:" to stay fixed while the values that displayed via javascript in the span tags change. The values in the span tags can have different lengths which means at the moment the text doesn't stay fixed. Anyone know how I can get the text to stay fixed while the values change? I've tried setting it to "absolute" but when the page is zoomed in on the text doesn't stay inline with the rest of the page. HTML: <div id="sliderToolResults_Borrow">Borrow: <span id="resultRequested" class="sliderResultBorrow"></span> </div> <div id="sliderToolResults_Interest"> + Interest: <span id="resultInterest" class="sliderResultInterest"></span> </div> <div id="sliderToolResults_Repay"> = You repay*: <span id="resultTotal" class="sliderResult"></span> </div> CSS: #sliderToolResults_Borrow { position:relative; left: 50px; top: -30px; font-style:italic; float: left; } #sliderToolResults_Interest { position:relative; left: 70px; top: -30px; font-weight: 100; float: left; } #sliderToolResults_Repay { position:relative; left: 140px; top: -30px; font-weight: 100; float: left; } #sliderrepay { position: absolute; } #sliderBorrowResult { color: #ff9900; position:relative; left: 45px; bottom: -5px; } #sliderInterestResult { color: #ff9900; position:relative; left: 45px; bottom: -5px; } #sliderRepayResult { color: #ff9900; position:relative; left: 450px; bottom: -5px; } Any ideas? Any help would as always be appreciated. Cheers, CaptainChainsaw Quote Link to comment Share on other sites More sharing options...
CaptainChainsaw Posted October 16, 2012 Author Share Posted October 16, 2012 Got it sorted, I had to make some other elements absolute. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.