Re: Tabbed Interfaces in CSS

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 12:54:36 UTC