CSS to hide text
| Quote: |
| Mozilla doesn't hide invisible text styled with position strategies as {left:-2000em;}. |
That's not actually acurate Francesco.
| Code: |
| .hide {position:absolute; top:0; left:-500em} |
Does work in all browsers.
If you've had to add a font-size to that then I suggest you may have another issue in the CSS which conflicts.
Regards
Mike Foskett
<marquee><blink><work> webSemantics </work><rest> 2kool2 </rest> & <play> bangers & mashed </play></marquee></blink>
Have to agree with Mike on this one Francesco, sorry!
Cheers!
Cheers!
| Nigel Peck wrote: | ||||
(X)HTML
CSS
Will also not be read by some screen readers. Cheers, Nigel |
thank u very much for your help. you saved me hours of work. u rule
To hide a line you should use a display: none inc css or style="display: none" in tag.
Thanks Lloydi and Nigal for provide nice information.
I want to ask you, what are the benefits of hide the text in CSS?
I want to ask you, what are the benefits of hide the text in CSS?
| pupu6 wrote: |
| To hide a line you should use a display: none inc css or style="display: none" in tag. |
Assume this will completely hide it from everyone though. Use the offscreen method if you want to include 'hidden' information for the benefit of screen reader users.
And never "hide" content that can be deemed to be keyword content by Search Engines. As far as I can tell, you will get penalised.
scirocco...i guess pupu6's question is about hidding the content using external css or inline styles....
I guess inline styles can be used for content displayed dynamically.... Though it is a dynamic content, i would suggest to use class name using Javascript.
The advantage of using css class for hidding content is, if you thought of making it visible in future, you juz have to update the class and there you can change fontsize, color etc...if you are using inline style then u have change it where ever u provided the inline style.
Any comments on the above?
-muty
I guess inline styles can be used for content displayed dynamically.... Though it is a dynamic content, i would suggest to use class name using Javascript.
The advantage of using css class for hidding content is, if you thought of making it visible in future, you juz have to update the class and there you can change fontsize, color etc...if you are using inline style then u have change it where ever u provided the inline style.
Any comments on the above?
-muty


