Hiding text in IE7 with CSS

Déja Augustine's picture

Negative indent. Hackish solution, but it gets the job done... most of the time. It fails spectacularly in IE7, however.

If you're ever looking to hide that special text from your evil seventh aunty thrice-removed (i.e. ie) try this handy trick


#selector {
color: transparent;
text-transform: capitalize;
}

Interesting tidbit. IE will ignore the transparent color UNLESS you apply a text-transform to it as well. That seems to be the cue that IE waits for before doing anything TOO crazy.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockcode>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options

CAPTCHA
Are you a robot? We usually like robots, but not in our comments.
By submitting this form, you accept the Mollom privacy policy.