line-height style negated by image insertion

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

  1. #1

    Default line-height style negated by image insertion

    The line-height attribute works fine in IE using this code:

    Stylesheet:
    .text2 { font-family: Arial, Helvetica, sans-serif; font-weight:bold;
    font-size:10px; color:#000000; text-decoration:none; line-height:20px; }

    Code:
    <div style="padding:0px 10px 10px 10px">
    <span class="text2"> <u>My Text</u> <a href="mypdf.pdf"
    target="_blank">more</a> </span>
    </div>

    but when I add an image after the 'more' link like so:

    <div style="padding:0px 10px 10px 10px">
    <span class="text2"> <u>My Text</u> <a href="mypdf.pdf"
    target="_blank">more</a><img src="images/myimage.gif" width="8" height="6" />
    </span>
    </div>

    it negates the line-height specified in the styles. Any ideas why?


    jeffpelletier Guest

  2. Similar Questions and Discussions

    1. Adjust leading (line height) in form field
      I'm having the same issue. Please could you explain how to let the user change the leading. thanks
    2. Obtaining Width and Height for an Image
      I am having a problem here. I have an ASP page which displays different images according to the querystring and the images are all of different...
    3. Row Height - Image Tiling when Printing
      Hi - I have posted a protoype page for our new Web site hoping folks can help with two issues: www.scadawireless.com/newsite/draft3.htm When...
    4. CSS line height bug with lists in Opera?
      I was hoping someone could shed some light on a CSS bug... I have an <ul> unordered list with the line-height set to 1.5em. IE and Netscape...
    5. Image Height and Width values
      After pulling an image from the data base and the Image.Height and Image.Width are not set to the ImageURL's attributes. 1) Is there a way to...
  3. #2

    Default Re: line-height style negated by image insertion

    Which DW are you using? Is the page rendering in quirks mode or standards
    mode? What happens if you put the image outside the <span>?

    In DW8, I do not see the problem you are describing.

    --
    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
    ==================

    "jeffpelletier" <webforumsuser@macromedia.com> wrote in message
    news:dhu00m$h1v$1@forums.macromedia.com...
    > The line-height attribute works fine in IE using this code:
    >
    > Stylesheet:
    > .text2 { font-family: Arial, Helvetica, sans-serif; font-weight:bold;
    > font-size:10px; color:#000000; text-decoration:none; line-height:20px; }
    >
    > Code:
    > <div style="padding:0px 10px 10px 10px">
    > <span class="text2"> <u>My Text</u> <a href="mypdf.pdf"
    > target="_blank">more</a> </span>
    > </div>
    >
    > but when I add an image after the 'more' link like so:
    >
    > <div style="padding:0px 10px 10px 10px">
    > <span class="text2"> <u>My Text</u> <a href="mypdf.pdf"
    > target="_blank">more</a><img src="images/myimage.gif" width="8" height="6"
    > />
    > </span>
    > </div>
    >
    > it negates the line-height specified in the styles. Any ideas why?
    >
    >

    Murray *TMM* Guest

  4. #3

    Default Re: line-height style negated by image insertion

    Yeah...I tried stripping the code out of my page, and inserting in a blank haml
    page, and it works fine, it must be other styles affecting this somehow, I have
    a couple large style sheets, I'll have to do some back-tracking!

    Thanks - I'm using DWMX2004. Not sure what quirks or standards modes are.
    And tried the image movement, but same results. I'll figure it out.

    Thanks.

    jeffpelletier Guest

  5. #4

    Default Re: line-height style negated by image insertion

    If you are using DMX2004, your pages will all have a valid and complete
    doctype. This means that unless you change something, you will be rendering
    in Standards mode.

    --
    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
    ==================

    "jeffpelletier" <webforumsuser@macromedia.com> wrote in message
    news:dhu31t$lll$1@forums.macromedia.com...
    > Yeah...I tried stripping the code out of my page, and inserting in a blank
    > haml
    > page, and it works fine, it must be other styles affecting this somehow, I
    > have
    > a couple large style sheets, I'll have to do some back-tracking!
    >
    > Thanks - I'm using DWMX2004. Not sure what quirks or standards modes are.
    > And tried the image movement, but same results. I'll figure it out.
    >
    > Thanks.
    >

    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