function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC_LearnerSFDC_Learner 

Background color to the HTML Textbox

Hi,

I have a textbox with 100px width.

How could i fill the background color like this.

Per first 10px, i would like to fill red

Per next 60px, i would like to fill green

Per last 30px, i would like to fill white.

 

 

Can any one suggest me!!!

 

 

 

 

Tony P.ax1100Tony P.ax1100

I would use a background image for the textbox.  You could create an image that is 1px by 100px.  make the first 10 red, next 60 green, last 30 white.  Then you can stretch the image height=14px (or whatever).  Here's some code:

 

.tb4 {
	background-image: url(images/bg.png);
	border: 1px solid #dddddd;
	width: 100px;
}

 

SFDC_LearnerSFDC_Learner

Thanku very much for your reply..

 

Could you please share some more code... So that i can implement that in my application........