Guest emtx Posted May 8, 2012 Share Posted May 8, 2012 (edited) "text-overflow: blah;" adds "blah" at the end of my text box. Is it possible to style (eg colour, font etc.) that "blah" independantly from the rest of the text in that div? (I had white-space on the brain - was meant to name the thread Text-Overflow) Edited May 8, 2012 by emtx Link to comment Share on other sites More sharing options...
eTianbun Posted May 8, 2012 Share Posted May 8, 2012 NO! Link to comment Share on other sites More sharing options...
Guest emtx Posted May 8, 2012 Share Posted May 8, 2012 hmm, can I then use javascript to search for the word "blah" and attach a style to it? Link to comment Share on other sites More sharing options...
eTianbun Posted May 8, 2012 Share Posted May 8, 2012 (edited) Maybe you can try this on one <div> and see: d=document.getElementById('div');d.innerHTML=d.replace(/blah/gi,'<spanstyle="color:red">blah</span>') Edited May 8, 2012 by eTianbun Link to comment Share on other sites More sharing options...
Guest emtx Posted May 8, 2012 Share Posted May 8, 2012 I am a beginner at javascript, I'm not sure where to put that to make it work right.. 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