homepage Welcome to WebmasterWorld Guest from 54.242.140.11
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

    
Problem with display:none?
OO7girl

10+ Year Member



 
Msg#: 3889 posted 1:11 pm on Jun 17, 2004 (gmt 0)

Hi there,

I'm trying to use a CSS stylesheet to format an XML document. So far everything is working fine except that I can't get my <div style="display:none"> tags to work. The reason I need these is that the XML file is being used as an RSS as well as being displayed as fake HTML of sorts on a website, and I don't want the website to display some of the RSS info (<description>), <copyright>, etc.).

Here is the link to the XML doc:
<snip>

Does anyone know what I may be doing wrong?

[edited by: DrDoc at 1:31 pm (utc) on June 17, 2004]
[edit reason] No URLs, thanks. See TOS [webmasterworld.com] [/edit]

 

OO7girl

10+ Year Member



 
Msg#: 3889 posted 2:07 pm on Jun 17, 2004 (gmt 0)

Nevermind - got it to work!

OO7girl

10+ Year Member



 
Msg#: 3889 posted 2:50 pm on Jun 17, 2004 (gmt 0)

Oops - have run into another roadblock.

I can make the undesired XML tags not show up when the browser is displaying the XML files, but then the RSS feed doesn't validate.

I was using <div style="display:none">, but now I'm trying to control the visibility of the undesired XML tags via my external stylesheet, hoping that this will mean the RSS feed validates again since the XML will contain no illegal tags. Below is my stylesheet, which for some reason does not work in making the channel description, link, and image XML elements invisible. Any help would be great!

channel
{
display:block;
height:300px;
width:280px;
border:1px solid #999966;
overflow:auto;
background-color:#cccc99;
font: 12px arial;
}

channel>link, channel>copyright, channel>image, channel>url
{
display: none;
}

item
{
display: block;
padding:20px;
margin-bottom:10px;
border-top:1px solid #999966;
border-bottom:1px solid #999966;
background-color:#ffffff;
}

title
{
display: block;
margin-bottom:10px;
border-bottom:1px solid #999966;
background-color:#ffffff;
font-weight:bold;
}

link
{
display: block;
padding:20px;
margin-bottom:10px;
}

channel>title
{
display: block;
margin-bottom:10px;
margin-top:10px;
padding:20px;
border-bottom:1px solid #999966;
background-color:#999966;
font-weight:bold;
}

channel>description
{
font-size:10px;
margin-bottom:10px;
margin-left:20px;
display: block;
padding:20px;
border-top:1px solid #999966;
border-bottom:1px solid #999966;
background-color:#ffffff;
}

channel>title
{
display: block;
margin-bottom:10px;
border-bottom:1px solid #999966;
background-color:#ffffff;
font-weight:bold;
}

channel>copyright
{
font-size:10px;
margin-bottom:10px;
margin-left:20px;
display: block;
padding:20px;
border-top:1px solid #999966;
border-bottom:1px solid #999966;
background-color:#ffffff;
}

item>title
{
font-weight:bold;
}

Should I be changing the order of things or something? Thanks!

[edited by: DrDoc at 3:40 pm (utc) on June 17, 2004]
[edit reason] Merged style sheet [/edit]

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