adding 'class' to an img tag

Ask a Question related to Macromedia Contribute General Discussion, Design and Development.

  1. #1

    Default adding 'class' to an img tag

    Hi, all,

    I've found two posts on this topic, but the fix offered doesn't do the trick.
    I've created a DW template that allows images to float either left or right,
    with text wrapping around the image. Everything's fine when I use DW to create
    a page, but in Contribute 4, instead of pinning the 'class' from the style
    definition into the <img> tag, it places it in the <p> tag. The suggestions to
    (in Contribute) select Format>Styles doesn't correct the problem. If I take
    the Contribute-originated page into DW and move the class statement from the
    <p> tag into the <img> tag, it works fine and the text wraps the way I want it
    to. This isn't an acceptable solution, though, since a non-DW user handles all
    the Web edits.

    How can we work around this problem? Anyone come up with anything creative?

    Thanks for listenin',
    Anita

    tnuaga Guest

  2. Similar Questions and Discussions

    1. Adding css class styles to images
      I have a page template created with css that I would like to allow my users to add images, and based on the style selected, have the image appear to...
    2. Adding elements/properties to class
      Ok I have written a simple little class (Attached below.) Is there a way to add elements to this class in my main movie file? like instead of test...
    3. Adding Web Control Class
      Hi, I add a class to my project and this calss is derived from System.Web.UI.Control to create a web control in my project. But I can't use this...
    4. adding methods to a C++ class in 1.8.0 - has anything changed?
      Hi I'm currently writing a tool where the data-structure is coded in C++, but manipulated in wonderful Ruby. I had also added some 'ruby...
    5. adding methods to an existing class
      Hi -- On Thu, 7 Aug 2003, Volkmann, Mark wrote: def add_test_method(klass) klass.class_eval { define_method(:some_test) { puts "testing!"...
  3. #2

    Default Re: adding 'class' to an img tag

    I've found it's very tricky to make sure you've selected the correct item when
    adding the style. It may look like you have the image selected, but it's really
    the paragraph, so that's where the class gets applied. You might try applying
    the class immediately after adding the image, before it's unselected. Or try
    clicking on the image instead of mouse-dragging over it to select it. You might
    put some text before and after it to make sure when you select the image, it
    hasn't selected the text, and therefore not the <p> tag.

    Overall, though, Contribute is very quirky and it's extremely difficult to
    select the right thing. If you are just using the class to control left/right
    wrap, why not use the image properties instead?

    abna Guest

  4. #3

    Default Re: adding 'class' to an img tag

    Thanks for the response. I'm able to select just the image and then Format >
    Style and select the style I want to use (imgLeft), which floats the image to
    the left margin. I noticed that the text next to the image was showing imgLeft
    as its class, too. I selected the text, selected "body" as the style - but it
    doesn't change styles. I'll try creating a new page from scratch (and
    template) and see if I'm able to force the text style to something different
    from the image style (which is being embedded into the <p> tag.

    But in the meantime, how would I use the image properties to conquer this
    problem?

    Looking forward to your solution ...
    Anita

    tnuaga Guest

  5. #4

    Default Re: adding 'class' to an img tag

    Right click on the image. Choose Image Properties. In the alignment dropdown, choose Left or Right. That will float your image to the left or right and the text will wrap around it.
    abna Guest

  6. #5

    Default Re: adding 'class' to an img tag

    Yep - tried that previously. The image properties shows "left" as an
    attribute, but the text still isn't wrapping. Well, let me restate that. The
    first paragraph of text finally did wrap, but the second paragraph begins below
    the image (and indented about 100 pixels for some reason). The first paragraph
    retains the "imgLeft" style (due to its placement inside the <p> tag) and I
    can't change that in Contribute. The second paragraph's style is "body", which
    works when I monkey with the page in DW. Weird.

    I think it may have to do with the order in which the page was created. I
    realize that this would be counter to the whole template concept, but it would
    be nice for our editor to be able to tweak the source code in cases like this.

    Thanks again for your response. If you have any other suggestions, I'm wide
    open to 'em! And if this helps, here's the URL to the (as yet unpublished)
    page.

    tnuaga 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