homepage Welcome to WebmasterWorld Guest from 54.145.252.85
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
How to hide from displaying content in correct way?
toplisek

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3821863 posted 1:40 pm on Jan 8, 2009 (gmt 0)

I have code like:
#skip, h3 span {display:none}

Should be all content in the DIV and will not be visible or I have to make each #skip img
like #skip1 #skip3 for particular element?
On web site is also image...ads, text content...

 

le_gber

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3821863 posted 3:49 pm on Jan 8, 2009 (gmt 0)

everything that is included between <div id="skip"> and </div> will be hidden.

If you want to hide different divs, or different section of a page use a class instead (class="skip" and .skip{ display:none; }.

If it's content you want to display at some point or people to read, use negative positioning rather than display none as the latter would be ignored by screen readers.

#skip { position:absolute; left:-999em; }

toplisek

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3821863 posted 8:36 am on Jan 9, 2009 (gmt 0)

I have put sample:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<style type="text/css">
/*<![CDATA[*/
#skip {display:none}
/*]]>*/
</style>
</head>

<body>
<table>
<tr>
<td></td>
<td>
Thursday, December 04, 2008
Depression Marketing Best Practices
No, we're not in a depression. But, given all the recent depression buzz (Krugman's book, non-stop CNBC pundits who won't shut up about crashes and black Mondays and Fridays,) I pulled Studs Terkel's fantastic Hard Times down off the shelf the other night. There's a section in there called "The Big Money" where he interviews people that actually did well during the Depression. Here are some outtakes from William Benton's interview:

"I left Chicago in June of '29, just a few months before the Crash. Chester Bowles and I started in business with seventeen hundred square feet, just the two of us and a couple of girls. July 15, 1929--this was the very day of the all-time peak on the stock market.

As I solicited business, my chart was kind of a cross. The left-hand line started at the top corner and ended in the bottom right corner. That was the stock market index. The other line was Benton & Bowles. It started at the bottom left-hand corner and ended in the top right-hand corner. A cross... When I sold the agency in 1935, it was the single biggest office in the world. And the most profitable office."

Well, this is an interesting case study, I thought. Maybe I should pay attention. The most amazing thing about Hard Times is how familiar it seems. The passages talking about bubbles, business cycles, people's incredulity at how all this happened is really eerie. So how did Benton & Bowles kick butt in the depression?

</td>
<td><div id="skip"><img src="ads.jpg" width="209" height="262" alt="" /></div></td>
</tr>
</table>
</body>
</html>

It will remove ads image.

But do not understand actually what you would like to advise regarding last point: to display at some point or people to read, use negative positioning rather than display none
If I would like to display, will not be used other CSS as probably ads should be position as defined (third colomun)
not position:absolute; left:-999em;

[edited by: toplisek at 8:38 am (utc) on Jan. 9, 2009]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved