W3C home > Mailing lists > Public > www-style@w3.org > December 2010

Re: Two CSS challenges

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Sun, 26 Dec 2010 01:23:34 +0100
Message-ID: <4D168B06.9020708@disruptive-innovations.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
CC: Andrew Fedoniouk <andrew.fedoniouk@live.com>, www-style@w3.org
Le 25/12/10 21:31, Andrew Fedoniouk a écrit :

> Here are two challenges that have no solutions in modern CSS.
>
> 1. Consider this simple markup:
>
> <p> Something <span>Like a Button</span></p>
>
> I would like to define the span above to behave (visually) as a
> button - on span:active I would like to shift/offset its text from
> its normal position by 1px.

You want vertical-align-offset.

> 2. Consider another markup:
>
> <div> text 1 <p>text 2</p> </div>
>
> By definition [1] "text 1" is wrapped into so called anonymous box -
> block element of appropriate type. If I want to draw 1px solid red;
> border around that box how would I do so?

::text is clearly not enough here and it will disappoint a lot of
people:

<div>
    text 1<br/>
    text 2
    <p>text 2</p>
</div>

Even with ::text, you can't style "text 2".

</Daniel>
Received on Sunday, 26 December 2010 00:24:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT