Re: Two CSS challenges

>-----Original Message----- 
>From: Daniel Glazman Sent: Saturday, December 25, 2010 4:23 PM Subject: Re: 
>Two CSS challenges
>Le 25/12/10 21:31, Andrew Fedoniouk a ecrit :
>>
>> 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.

I don't know such creature as "vertical-align-offset".

I want something like this:

::text
{
   position:relative; left:1px; top:1px;
}

that is shift in both directions.

>
>> 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".
>

With ::text I can style both lines as
"text 1<cr/lf> text 2"
is wrapped into single anonymous [text] box.

If <br/> was not declared as display:block; of course but that is another 
story.


-- 
Andrew Fedoniouk

http://terrainformatica.com 

Received on Sunday, 26 December 2010 01:16:58 UTC