#1
  1. Controlfreak
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Netherlands
    Posts
    32
    Rep Power
    11

    Get Css to only apply to specific content


    Hi,
    I have a weird litlle problem here...

    I have embedded a forum (invision) in my website. This forum uses a stylesheet for all its settings (duh).
    I can choose if I want to use it inline or external.
    Offcourse, my site also has its own stylesheet to work with.

    Because the forum code is on a <div > in my site, the css from the forum messes up my site.

    Is it possible to get the forum stylesheet to be only applicable inside the layer that it's on? Inline or linked?

    I tried using an iframe instead of a div, but that gives a heap of other trouble (especially cookie-related) so that's not an option...
    "You are not drunk if you can lie on the floor without holding on"
  2. #2
  3. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    if you place the forum in a div with a id you can refer all the forums css by placing the id infront of the style.

    Code:
    simplified example
    like 
    
    <div id="forum">
    	<div> this is the forum</div>
    </div>
    
    then in css. 
    
    #forum div {
            some:style;
    }

IMN logo majestic logo threadwatch logo seochat tools logo