Log in   Register a New Account

Accessify Forum - Discuss Website Accessibility

New to the forum?

Only an email address is required.

Register Here

Already registered? Log In

Currently Online

No registered users are online.

CSS to hide text

Reply with quote
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> &amp; <play> bangers & mashed </play></marquee></blink>
Reply with quote Have to agree with Mike on this one Francesco, sorry!

Cheers! Smile
Reply with quote
Nigel Peck wrote:
(X)HTML

Code:
<span class="youarehere">You are here:</span> Home > Foo > Bar


CSS

Code:
span.youarehere { display:none; }


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
Reply with quote To hide a line you should use a display: none inc css or style="display: none" in tag.
Reply with quote Thanks Lloydi and Nigal for provide nice information.
I want to ask you, what are the benefits of hide the text in CSS?
Reply with quote
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.
Reply with quote 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

Display posts from previous:   

Page 2 of 2

Goto page Previous  1, 2

All times are GMT

  • Reply to topic
  • Post new topic