Re: Have css not cascade?

Discussion in 'HTML' started by Jukka K. Korpela, Nov 14, 2008.

  1. Spud wrote:

    > Is it possible to get a style to apply only to a parent element, and
    > not its children?


    Yes. But why does your Subject line ask a completely different question, and
    one that asks for something logically impossible (Cascading Style Sheets
    without cascade)?

    Beware that any CSS-related question containing the word "cascade" or
    "inherit" in some form contains at least one fundamental misconception.

    > Example:


    URL?

    > <ul>
    > <li style="open">one


    Why not post at least real code?

    If "open" stands for some style sheet, then it all depends on what it
    contains. Hence my request for a URL or at least real code. Some properties
    are inherited under some conditions, some are not.

    > I'd like to toggle the style of parent <li> or <ul> tags without
    > affecting the children.


    Toggle? Tags? You sound confused, as expected.

    > Unfortunately, the style cascades down the tree.


    Unfortunately, it seems that you have to start learning what CSS is.

    > I have the same problem with event handlers.


    That's something completely different.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Nov 14, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnold Peters
    Replies:
    1
    Views:
    327
    Sudsy
    Oct 6, 2004
  2. Replies:
    6
    Views:
    554
    Jonathan N. Little
    Mar 18, 2006
  3. dorayme

    Re: Have css not cascade?

    dorayme, Nov 14, 2008, in forum: HTML
    Replies:
    0
    Views:
    402
    dorayme
    Nov 14, 2008
  4. Adrienne Boswell

    Re: Have css not cascade?

    Adrienne Boswell, Nov 14, 2008, in forum: HTML
    Replies:
    0
    Views:
    398
    Adrienne Boswell
    Nov 14, 2008
  5. Roy A.

    Re: Have css not cascade?

    Roy A., Nov 14, 2008, in forum: HTML
    Replies:
    0
    Views:
    406
    Roy A.
    Nov 14, 2008
Loading...

Share This Page