css selector question

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default css selector question

    Just wondering how I could effectually make a class style within another class
    style? The way I'm trying to do it is not working. The parent selector
    (.photos) is not unique, so I didn't make it an id.

    I tried to string together classes as in below (.photos .box), but a later
    ..box class style over-ruled the prior .photos .box style. I'm sure I don't know
    how to make this work.

    EXAMPLE
    .photos .float_rt{
    float:right;
    }

    .photos .box {
    float:left;
    width: 100px;
    height: 120px;
    padding: 5px 0px;
    margin:0px;
    text-align:center;
    vertical-align:bottom;
    line-height: 10px;
    border: 1px solid red;
    }

    .photos .box .pic{
    bottom:0;
    height: 85px;
    width:85px;
    margin: 5px;
    border: 1px solid blue;
    }
    .photos .box .txt{
    padding:0px 5px;
    margin:0px;
    text-align:center;
    word-wrap:break-word;
    }

    bo jehos Guest

  2. Similar Questions and Discussions

    1. Row Selector Column
      I have created a custom control that dynamically creates a datagrid at runtime. The datagrid is made up of a collection of custom columns. One of...
    2. How to use CSS selector in a component
      Hi guys, I want to add <mx:Style> in a component, and define font in it. But flex seems does not support css selector in a component. So is...
    3. Can one pass variables through a selector?
      In article <clund-50F2A4.12443709092003@amstwist00.chello.com>, C Lund wrote: Yes - either use an NSInvocation to perform the call, or call...
    4. Multiple CSS selector styles
      Looking at the BBC's site, saving it and importing it into Dreamweaver I can see that the BBC's site has multiple CSS selector tags for links. They...
    5. CSS and the ID selector
      I am having trouble getting the Dreamweaver CSS Styles palette/Properties palette to acknowledge ID based selectors. I can link to the external...
  3. #2

    Default Re: css selector question

    I'm not sure what you are trying to do.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "bo jehos" <webforumsuser@macromedia.com> wrote in message
    news:dpm6i7$prs$1@forums.macromedia.com...
    > Just wondering how I could effectually make a class style within another
    > class
    > style? The way I'm trying to do it is not working. The parent selector
    > (.photos) is not unique, so I didn't make it an id.
    >
    > I tried to string together classes as in below (.photos .box), but a later
    > .box class style over-ruled the prior .photos .box style. I'm sure I don't
    > know
    > how to make this work.
    >
    > EXAMPLE
    > .photos .float_rt{
    > float:right;
    > }
    >
    > .photos .box {
    > float:left;
    > width: 100px;
    > height: 120px;
    > padding: 5px 0px;
    > margin:0px;
    > text-align:center;
    > vertical-align:bottom;
    > line-height: 10px;
    > border: 1px solid red;
    > }
    >
    > .photos .box .pic{
    > bottom:0;
    > height: 85px;
    > width:85px;
    > margin: 5px;
    > border: 1px solid blue;
    > }
    > .photos .box .txt{
    > padding:0px 5px;
    > margin:0px;
    > text-align:center;
    > word-wrap:break-word;
    > }
    >

    Murray *TMM* Guest

  4. #3

    Default Re: css selector question

    I have a grid of pictures. This grid appears in several places.

    I called the class .photos.

    Then each photo is inside a box with a caption below.

    So you have a photo (.pic) + a piece of text(.txt) inside a box (.box) Then
    a bunch of .box divs floated in rows inside the .photos div.

    That's all! My only question is, how do I refer to those multiple classes
    which occur inside classes? I mentioned my first try didn't work (see above)

    bo jehos Guest

  5. #4

    Default Re: css selector question

    well, I tried .photo>.box>.pic.

    It worked fabulously in FF. And of course not in IE.
    bo jehos Guest

  6. #5

    Default Re: css selector question

    It would be so much easier if you showed me code. However, you can refer to
    the classes like this -

    div.photos div.box img.pic { styles }, or
    div.photos div.box .txt { styles }

    to specifically style the images or the text, respectively - just use
    descendent selectors.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "bo jehos" <webforumsuser@macromedia.com> wrote in message
    news:dpml2p$ein$1@forums.macromedia.com...
    > well, I tried .photo>.box>.pic.
    >
    > It worked fabulously in FF. And of course not in IE.

    Murray *TMM* 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