SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Edinburgh, Scotland
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Temporarily ignoring css?

    My website (http://www.johnrudge.f2s.com/ ) is based on free webfeeds and rss feeds.

    Feeds can be of the form:

    Code:
    <script language='JavaScript' src='http://www.devarticles.com/devfeed.php'></script>

    The problem I've found though is that where I have changed the styling of elements in my css, then these obviously filter through onto the feed.

    For example the above link should look like this (http://www.devarticles.com/cfexample.html), but because of my css it looks like this (http://www.johnrudge.f2s.com/generic...ed=35&feed2=36).

    Is there a way to temporarily turn off my styles so that the "default" styles can be used for the feeds?

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wrap the whole thing in a div or something with a specific class that has all things like link colours etc set to something more neutral...e.g.

    in your css
    Code:
    div.feed a {
        color: #00f;
    }
    
    div.feed font.black {
        color: #000;
    }
    
    div.feed font.white {
        color: #fff;
    }
    
    etc etc
    and in your html
    Code:
    <div class="feed">
        <script language='JavaScript' src='http://www.devarticles.com/devfeed.php'></script> 
    </div>
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Edinburgh, Scotland
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks redux, I'll give that a try.

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Edinburgh, Scotland
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Redux,

    Thanks for the pointer, as it put me on the right track.

    In the case of my example feed above, the only css stuff I needed to add was:

    Code:
    /* Override my page styles for feeds that are affected */
    div.feed p {
    	background-color:transparent;
    	color:#FFFFFF;
    }
    div.feed a {
    	font-weight:400;
    }
    div.feed a:hover {
    	background-color:transparent;
    }
    The resulting feed (http://www.johnrudge.f2s.com/generic...ed=35&feed2=36) displayed a darn sight better as a result.

  5. #5
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    glad it worked out
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •