W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Re: Tabbed Interfaces in CSS

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 24 Apr 2009 08:22:58 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <193351BF-336A-438B-8DF2-FC7596D2BCBB@gmail.com>
To: Giovanni Campagna <scampa.giovanni@gmail.com>
Ah, so that's what it is. And I can't seem to override it with my own  
'!important' declarations either, even if I put it in a 'style'  
attribute, so that does seem like a bug in Firefox.

On Apr 24, 2009, at 5:53 AM, Giovanni Campagna wrote:

> It is not the adjacency selector, is the UA default style sheet:
>
> legend {
>  padding-left: 2px;
>  padding-right: 2px;
>  border: none;
>  position: static ! important;
>  float: none ! important;
>  width: -moz-fit-content ! important;
>  min-width: 0 ! important;
>  max-width: none ! important;
>  height: auto ! important;
>  min-height: 0 ! important;
>  max-height: none ! important;
>  white-space: nowrap;
> }
>
> and apparently, !important inside UA stylesheets override author
> declaration (bug? or rather issue for CSS2?)
>
> 2009/4/23 Brad Kemper <brad.kemper@gmail.com>:
>>
>>
>>>> If you could provide a simple ugly example just using border,  
>>>> padding,
>>>> and margin, while still achieving the desired tab *layout*, I'd be
>>>> happier.  ^_^
>>>
>>>
>>> There were some things in the code that wouldn't display quite  
>>> right,
>>> since I didn't test before, so I'll post something new in a few  
>>> minutes that
>>> will show the positioning that can be acheived with existing CSS.
>>
>> Here, try this:
>>
>> http://www.bradclicks.com/cssplay/tabs2.html
>>
>> It shows the basic layout that is acheivable now. I used a class  
>> instead of
>> the checked pseudoclass, so clicking doesn't do anything.
>>
>> The adjacency selector doesn't seem to produce the right results in  
>> Firefox,
>> and I used it because Safari doesn't seem to support nth-child yet.
>>
Received on Friday, 24 April 2009 23:03:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:46:58 GMT