Google Feed API - How to hide author, separator, and date?

114 views
Skip to first unread message

Rachel Campbell

unread,
Jun 20, 2013, 3:06:07 PM6/20/13
to google-ajax...@googlegroups.com
I am using the Google Feed API to display a feed on a webpage. I want to hide the line with the author, dash separator, and date.

Here is a link to my code: My Page

I have added these lines to my CSS file:

.gf-result .gf-author,
.gf-result .gf-spacer,
.gf-result .gf-relativePublishedDate {
        display: none;
}


I've also tried:

.gf-result .gf-author,
.gf-result .gf-spacer,
.gf-result .gf-relativePublishedDate {
        display: none; !important
}


And I've tried breaking out each one on it's own line. However, the author, -, and date still appear on my page. I have tried other combinations like .gf-results or .gfc-results, but nothing will hide these 3 items. I'm puzzled because all of the other CSS rules I modified have worked.

Any thoughts?

Jeremy Geerdes

unread,
Jun 20, 2013, 10:32:54 PM6/20/13
to google-ajax...@googlegroups.com
Two thoughts. The first makes sense, the second is merely the result of experimentation. Don't ask me for an explanation.

First, you need to load your CSS AFTER the default Feeds API CSS is loaded, which means you have to load it at the tail end of the document head. This ensures that it takes precedence over the default stylesheet.

And second, you have to add !important to your display: none; rules. Here is what I ended up with which seemed to produce what you are looking for:



/*  google.feeds.FeedControl classes
 *  customization overrides
 */


/* the main feed display */
.gfc-results {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 12px;
}

.gfc-result {
  line-height: 16px;
  padding-bottom: 12px;
}
  
/* Feed Item title/headline */ 
.gf-result .gf-title {
   font-weight: bold;
   font-size: 14px;
   overflow: visible;
}
 
.gfc-resultsHeader, .gf-result .gf-author, .gf-result .gf-spacer, .gf-result .gf-relativePublishedDate, .gf-result .gf-spacer {
    display: none !important;
}




jg



--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/7195385a-861c-495d-b642-8a468117394a%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
Reply all
Reply to author
Forward
0 new messages