snoboardman96 Posted March 21, 2013 Share Posted March 21, 2013 Hi all, I am a fledgling web developer still looking to jump the nest yet. However I have lately been having to dig deep into the writing end of web development for the company I work for. My problem is I have 140,000+ products all of varying colors and I would like to be able to set an autorule in this specific field that grabs a certain word (blue for example) and change the font color. Has anyone run into this? is it possible even to do? suggestions wouldn't go amiss. let me know if more information is needed. }table, td, .bgcolor1, .bgcolor2, .bgcolor3, .pricecolor, a.regularlink, .nav1, a.nav1, .nav1_selected, a.nav1_selected, .nav2, a.nav2, .nav2_selected, a.nav2_selected, .nav3, a.nav3, .nav3_selected, a.nav3_selected, .navbottom, a.navbottom, .navspecials, a.navspecials {font-size: 12px; font-weight: bold;} Thank you all in advance for any help provided. Link to comment Share on other sites More sharing options...
Ingolme Posted March 21, 2013 Share Posted March 21, 2013 CSS is not capable of doing that. It would be complicated but Javascript can find some text and wrap it in an element with CSS style attached. 1 Link to comment Share on other sites More sharing options...
snoboardman96 Posted March 21, 2013 Author Share Posted March 21, 2013 thanks foxy mod, any resources on javascript for it? Link to comment Share on other sites More sharing options...
dsonesuk Posted March 21, 2013 Share Posted March 21, 2013 you can target an attribute, if the colour is pick up from database, you could add it to specific attribute, and use css to apply styling to it HTML5 data storage attribute validates and works, X/HTML works but validates? maybe not. <div data-color="blue">Blue product</div> css [data-color=blue]{color:blue;} <td bgcolor="blue">blue</td> td {background-color:transparent;}[bgcolor=blue]{color:blue;} 1 Link to comment Share on other sites More sharing options...
snoboardman96 Posted March 21, 2013 Author Share Posted March 21, 2013 Thank you dsonesuk, It will be a bit before I am able to implement this I'll Post again after I am able, Thank you again for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now