Jump to content

Keeping Text Fixed Issue


CaptainChainsaw

Recommended Posts

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 :)

Link to comment
https://forums.phpfreaks.com/topic/269522-keeping-text-fixed-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.