I forgot to add css-discuss to the address...

---------- Forwarded message ----------
From: Cristian Palmas <[EMAIL PROTECTED]>
Date: 2008/10/24
Subject: Re: [css-d] negative background position for sprite
To: Marty Martin <[EMAIL PROTECTED]>


2008/10/24 Marty Martin <[EMAIL PROTECTED]>

> Greetz everyone,
>
> So I have this H1 tag and I have a little graphic sprite I want to
> negatively position to the left of the H1 but when I do, the sprite
> gets cut off at the box border of the H1.  Is there a way around that
> so I can negatively position the sprite without it getting cut off?
>
> Here's what I have (spaces added for emailing purposes)--
>
> < h1 class="mountain" >Front-Porch Living Is Alive and Well in the South<
> /h1 >
>
> CSS--
>
> h1 {
>        font: 1.4em Georgia, "Times New Roman", Times, serif;
> }
>
> .mountain {
>        color: #9b422d;
>        background: url(images/h1-mountain-arrow.png) -15px 0px no-repeat;
> }
>
>
> All help appreciated!
>
> Marty Martin


Hi,

If you put the sprite in the background of the h1 tag, it is obvious that it
is cut off by the box of the tag.
I don't know what kind of code you have but in theory this snippet would
work:


h1 {
       font: 1.4em Georgia, "Times New Roman", Times, serif;
       margin-left: 15px; /*<-- add to push on the right the text of the h1
tag */
}

.mountain {
       color: #9b422d;
       background: url(images/h1-mountain-arrow.png) 0px 0px no-repeat;
/*<-- change -15px into 0px and see the result  */
}

Hope this helps.

-- 
~ Cristian Palmas ~
http://www.cristianpalmas.it



-- 
~ Cristian Palmas ~
http://www.cristianpalmas.it
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to