W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: width and height

From: Bruno <bruno5544@gmail.com>
Date: Tue, 25 Jan 2011 19:14:17 +0100
Message-ID: <AANLkTikGWSaekkyXjAjNvDCG=kN_-7qvx=iyTgCZkPJq@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style@w3.org
Then this is the problem. But then why margin and padding works, with
those you can achieve what you would do with height&width for a:hover,
maybe it won't look nice, but with padding under a:hover you can do
same thing instead of using height or width.
Then why not placing "proper" rule to have actual width and height under :hover.

Padding sample works fine here:
<style type="text/css">
#css a:hover {

<div id="css"><a href="#">test</a></div>


2011/1/25 Tab Atkins Jr. <jackalmage@gmail.com>:
> On Tue, Jan 25, 2011 at 9:52 AM, Bruno <bruno5544@gmail.com> wrote:
>> Here you go:
>> #css a:hover {
>>        color:red;
>>        background-color:blue;
>>        height:100px;
>>        width:400px;
>> }
>> Don't know how it works for you when I tested it on all major browsers
>> and doesn't work on any.
> Could you post the *whole* testcase?  HTML and the rest of the CSS?
> You do realize that, by default, <a> is an inline element, and 'width'
> and 'height' don't work on inline elements?
> ~TJ
Received on Tuesday, 25 January 2011 18:15:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:55 UTC