www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > CSS

    CSS Discussion and technical support relating to Cascading Style Sheets.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 09-19-2006, 04:55 AM
    patenaudemat's Avatar
    patenaudemat patenaudemat is offline
    Firefox Enthusiast
     
    Join Date: Jul 2004
    Location: Rhode Island
    Posts: 190
    Selective "Clean Slate"

    Hey there,

    I'm creating a little app that grabs pieces of content from remote locations (via JavaScript/Ajax), and creates elements dynamically on a web page to display them. These elements have their own style information, which I assign inline. This seems to work very well, except for one issue: some of the style information from the main page bleeds over.

    Let me tell you what I mean. For example, my page has a CSS rule that adds a bottom border to all images. I don't want that to apply to my new content, but I a) don't want to modify my page's stylesheet (I can add style elements dynamically, which is the preferred method), and b) can't really take into account all of the different things I can reset to their default, since this script could be used on any site.

    Basically what I'm looking for is a way to give a group of elements a clean slate; that is, for example, to be able to take one class, and tell that class not to inherit any CSS properties, and only use the ones defined specifically for it (be it inline, or in a style section pertaining only to that element). Is there any way to accomplish this?

    Thanks in advance!

    -Matt
    __________________
    Matt Pat
    The World's Best Web Browser (Windows, Linux, and Mac): Get Firefox!
    My website: http://www.mattpat.net
    Control iTunes Remotely: TuneConnect

    "What's accepted is not always what's right."
    Look it up: What's the longest word in the English language?
    Reply With Quote
      #2  
    Old 09-19-2006, 08:28 AM
    KDLA's Avatar
    KDLA KDLA is offline
    Miss Moderator
     
    Join Date: Jan 2005
    Location: Frankfort, KY, USA
    Posts: 6,146
    Why don't you add a div before your content with an id called clean slate, which you could specify the changes to that section's content? With the div association, that will not change your previous css styling.
    __________________
    FYI
    * My screen resolution is set at 1680x1050
    * I'm accessing your site through a T1 line
    * I'm probably viewing it using Firefox (unless browser is specified)
    Reply With Quote
      #3  
    Old 09-19-2006, 08:49 AM
    patenaudemat's Avatar
    patenaudemat patenaudemat is offline
    Firefox Enthusiast
     
    Join Date: Jul 2004
    Location: Rhode Island
    Posts: 190
    Not a bad concept, but the idea is that this is being designed for use on other websites. I won't have any clue what CSS properties I'll need to reset, unless I should just go through the standard and reset all of them to what the defaults should be.

    -Matt
    __________________
    Matt Pat
    The World's Best Web Browser (Windows, Linux, and Mac): Get Firefox!
    My website: http://www.mattpat.net
    Control iTunes Remotely: TuneConnect

    "What's accepted is not always what's right."
    Look it up: What's the longest word in the English language?
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 04:32 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.