|
Inserting Text
|
sumitra
#:3603917
| 12:20 pm on Mar. 18, 2008 (utc 0) |
Hello, Can we insert text to html page through css? I didnt find any option.. I think its not possible.. but if there is any option inserting text (like value, caption etc.. are not available in css ) pls let me know. Thanks!
|
alias
#:3603926
| 12:31 pm on Mar. 18, 2008 (utc 0) |
yes, you actually can. p:before {content: "I'm before!"}; google for "css before after pseudo selectors". but it's only available in CSS2 - which is not yet supported by the majority of the browsers, so rather not YET usable.
|
sgietz
#:3603996
| 1:56 pm on Mar. 18, 2008 (utc 0) |
The idea of inserting content via CSS usually results in cold sweats and intense chest pains among purists. ;)
|
alias
#:3603998
| 2:02 pm on Mar. 18, 2008 (utc 0) |
well it depends on what you want to insert ;) in most cases it would hopefully be used to insert something simple. but, well, there are all kinds of web developers out there for sure ;)
|
sgietz
#:3604106
| 3:13 pm on Mar. 18, 2008 (utc 0) |
Oh, I agree. I think this is an extremely useful feature, but as you said, there are lots of folks with lots of opinions. :)
|
Xapti
#:3604196
| 4:31 pm on Mar. 18, 2008 (utc 0) |
Use javascript for inserting text. CSS isn't really for that, and most browsers don't support it well yet anyways. Any text inserted should be unimportant, as to not exclude users with javascript disabled.
|
swa66
#:3604528
| 9:37 pm on Mar. 18, 2008 (utc 0) |
You can insert text as noted, and even a purist should have no problem with e.g. inserting a highly style double quote before a class used to represent quotes. What you can do with characters is probably going to be nicer than what you do with graphics, esp. if you look at scaling it.
|
sumitra
#:3605174
| 12:02 pm on Mar. 19, 2008 (utc 0) |
Thank you very much !
|