Opened 13 years ago
Closed 13 years ago
#8933 closed Bug (invalid)
Floated image is not floated, when added a link
Reported by: | HerrSerker | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
If you add a image in the text and have it a floated style, all is correct, the generated code is
<img src="example.com/img" style="float:left; width: FOOpx; height: BARpx" />
If you add a link to the image, the <img> tag is wrapped with the <a> tag's code.
What is wrong? The 'float:left' style should now be on the link and not on the image.
Wrong: <a href="http://example.com"><img src="http://example.com/img" style="float:left; width: FOOpx; height: BARpx" /></a>
Right: <a style="float:left" href="http://example.com"><img src="http://example.com/img" style="width: FOOpx; height: BARpx" /></a>
I tried this on the nightly build demo page. It shows the wrong behavior there.
Change History (1)
comment:1 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 3.6.4 (SVN - trunk) |
You had me thinking there for a while :).
Code:
With the above examples - the visual representation is the same - hand cursor when hovering over image. The problem starts when user wants to take dimensions of link, containing a floated image, with JavaScript. The result will be 0x0 - this is because container element does not include floated elements when calculating its dimensions - This is how it is as you probably know.
This may be something not expected but we can't change this because: