W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: CSS vs. img size attributes

From: Simon Pieters <simonp@opera.com>
Date: Tue, 25 Nov 2014 11:45:16 +0100
To: "www-style list" <www-style@w3.org>, "Henrik Andersson" <henke@henke37.cjb.net>
Message-ID: <op.xpvmtqg3idj3kv@simons-macbook-pro.local>
On Tue, 25 Nov 2014 09:34:35 +0100, Henrik Andersson  
<henke@henke37.cjb.net> wrote:

> Is there a clear specification that rules on which takes precedence, CSS
> or explicit width and height attributes of an <img> element in a HTML
> document?


Your CSS rules using width and height properties win over <img width  
height> presentational hints.

> The same goes for any replaced element: what if the replacing content
> has a set size in the DOM? Or for that matter, if it has an intrinsic  
> size.


Simon Pieters
Opera Software
Received on Tuesday, 25 November 2014 10:44:58 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:45 UTC