Get CSS properties affecting div element?

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Get CSS properties affecting div element?

    Is there any way to determine the different CSS properties affecting any
    particular element in a document? For example, let's say I want to find
    out the float value of some div in my HTML document body where the float
    property is defined via a linked CSS file. Anyway to do that without
    parsing the css manually myself? From what I gather, given that the DOM
    is based on the level 1 spec, it ain't happenin. I could be missing
    something though ;)
    senocular Guest

  2. Similar Questions and Discussions

    1. javascript help - form element has no properties
      i'm having trouble figuring out this error: document.getElementById("tsearch") has no properties here is the javascript: <script...
    2. #25640 [Opn->Asn]: simplexml element object properties return empty objects
      ID: 25640 Updated by: sniper@php.net Reported By: tater at potatoe dot com -Status: Open +Status: ...
    3. #25640 [NEW]: simplexml element object properties return empty objects
      From: tater at potatoe dot com Operating system: * PHP version: 5CVS-2003-09-23 (dev) PHP Bug Type: XML related Bug...
    4. [HTML::Element] how to read element by element
      Hello I read the doc about HTML::Element, but I don't find how to read the tree create by parse() element by element. The doc says the tree looks...
    5. templates affecting seo
      Does using the template for the home page affect seo?
  3. #2

    Default Re: Get CSS properties affecting div element?

    senocular wrote:
    > Is there any way to determine the different CSS properties affecting any
    > particular element in a document? For example, let's say I want to find
    > out the float value of some div in my HTML document body where the float
    > property is defined via a linked CSS file. Anyway to do that without
    > parsing the css manually myself? From what I gather, given that the DOM
    > is based on the level 1 spec, it ain't happenin. I could be missing
    > something though ;)
    While that info appears to be available to the Tag inspector by way of
    the relevant CSS panel, it isn't available to the extension developer,
    at least not in any way that I can find.

    --
    Danilo Celic
    | Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
    | Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
    danilocelic *TMM* Guest

  4. #3

    Default Re: Get CSS properties affecting div element?

    I was afraid of that. Thanks Danilo. I'll post anything I find
    regarding this if I should find anything, though I have a feeling I'll
    just need to keep things simple and rip through the css myself.

    danilocelic *TMM* wrote:
    > senocular wrote:
    >
    >> Is there any way to determine the different CSS properties affecting
    >> any particular element in a document? For example, let's say I want
    >> to find out the float value of some div in my HTML document body where
    >> the float property is defined via a linked CSS file. Anyway to do that
    >> without parsing the css manually myself? From what I gather, given
    >> that the DOM is based on the level 1 spec, it ain't happenin. I could
    >> be missing something though ;)
    >
    >
    > While that info appears to be available to the Tag inspector by way of
    > the relevant CSS panel, it isn't available to the extension developer,
    > at least not in any way that I can find.
    >
    senocular Guest

  5. #4

    Default Re: Get CSS properties affecting div element?

    senocular wrote:
    > I was afraid of that. Thanks Danilo. I'll post anything I find
    > regarding this if I should find anything, though I have a feeling I'll
    > just need to keep things simple and rip through the css myself.
    One thing that may help you along with that:
    [url]http://www.communitymx.com/blog/index.cfm?newsid=146&blogger=35[/url]

    I don't even you this, especially given the prevalance of hacks,
    filters, and IE conditional comments that can potentiall mess up any parser.

    --
    Danilo Celic
    | Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
    | Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
    danilocelic *TMM* Guest

  6. #5

    Default Re: Get CSS properties affecting div element?

    well that's certainly handy - and conveniently undocumented (not
    surprisingly). Of course obtaining ids/classes isn't a problem. The
    problem is finding out how they're styled.

    Presently, the environment I need for this to work in is pretty
    controlled, so I'm not so worried just yet ;)


    danilocelic *TMM* wrote:
    > senocular wrote:
    >
    >> I was afraid of that. Thanks Danilo. I'll post anything I find
    >> regarding this if I should find anything, though I have a feeling I'll
    >> just need to keep things simple and rip through the css myself.
    >
    >
    > One thing that may help you along with that:
    > [url]http://www.communitymx.com/blog/index.cfm?newsid=146&blogger=35[/url]
    >
    > I don't even you this, especially given the prevalance of hacks,
    > filters, and IE conditional comments that can potentiall mess up any
    > parser.
    >
    senocular Guest

  7. #6

    Default Re: Get CSS properties affecting div element?

    senocular wrote:
    > well that's certainly handy - and conveniently undocumented (not
    > surprisingly). Of course obtaining ids/classes isn't a problem. The
    > problem is finding out how they're styled.
    Currently those functions only give you class names and id names in the
    CSS. Unfortunately it doesn't currently give you any selector info, for
    example, it won't give you a way to see something like this in your
    style sheet:
    div#content h1 a

    Because of the cascading nature of CSS, you'd have to be aware of all
    the styles the might apply to a particular element. I've looked for a
    JavaScript CSS pasrser, but haven't found one in several searches, but
    maybe one exists out there already.
    > Presently, the environment I need for this to work in is pretty
    > controlled, so I'm not so worried just yet ;)
    Good for you, and good luck.

    --
    Danilo Celic
    | Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
    | Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
    danilocelic *TMM* Guest

  8. #7

    Default Re: Get CSS properties affecting div element?

    I searched too without luck. What I have is basic and I'm not going to
    try make it go beyond that.

    cheers

    danilocelic *TMM* wrote:
    > Because of the cascading nature of CSS, you'd have to be aware of all
    > the styles the might apply to a particular element. I've looked for a
    > JavaScript CSS pasrser, but haven't found one in several searches, but
    > maybe one exists out there already.
    senocular Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139