The Artima Developer Community
Sponsored Link

Java Buzz Forum
Default text in CSS

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Default text in CSS Posted: Nov 14, 2005 7:55 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Default text in CSS
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

When we style something in CSS, we can put images as backgrounds, font colors, alignment, and much more.

If I can assign images to an element, why not some text?

How about if we could say "this id or class has the default text of FOO". We can take the DRY principle and take it to CSS.

We get to set default text in a site/application wide CSS file, and share this throughout.

.nosuch {
   text-content: "some default text";
}

We could also give default pre-text (always put "Error: " before anything in the error class).

A slight abuse of CSS? Totally, but could be useful! :)

This could even be implemented a little via JavaScript behaviour (not with nice CSS syntax).

Read: Default text in CSS

Topic: How To Trace Your Genetic Father Using Internet; No More Anonymity for Anonymous Sperm Donors Previous Topic   Next Topic Topic: New Podcast: DrunkAndRetired.com Gravy

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use