This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12933 - Other tags should be allowed inside an img tag
Summary: Other tags should be allowed inside an img tag
Status: RESOLVED WONTFIX
Alias: None
Product: HTML.next
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL: a11y
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-10 16:41 UTC by Bernhard Rosenkraenzer
Modified: 2013-01-11 13:30 UTC (History)
5 users (show)

See Also:


Attachments

Description Bernhard Rosenkraenzer 2011-06-10 16:41:40 UTC
Currently, it is hard to position an element relative to an image of unknown width/height without using JavaScript.

If you wish to have an element on top of an image (e.g. an icon to trigger an activity), it would be nice to do something along the lines of

<img src="whatever.png" alt="something">
  <div style="position: relative; left: 5%; top: 5%; width: 45%; height: 45%; background-color: green; opacity: 0.8;">something</div>
</img>

(Replacing the img with a div with the image set as background-image works for placing the inner div, but there doesn't seem to be a way to force the div to have the exact size of the image without JavaScript.)
Comment 1 Robin Berjon 2013-01-11 13:30:21 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: none
Rationale: It's likely impossible to achieve that in that manner. Using script in order to solve this does not strike me as a major problem, but at any rate a better solution would come from CSS.