At 3/15/2007 01:13 PM, jeffrey morin wrote:
>i have a box with 4 paragraphs in it. one paragraph has nothing but a link
>which is 2 words long. my question is can i apply tex-align: right to that
>link somehow without adding another class in my code.
>
>i tried #divBox p a:link {text-align: right} and i tried #divBox a
>{text-align: right} neither of those worked though. does anyone have a
>solution


Try removing ":link" from your CSS rule and reduce your selector to simply
         #divBox p a
You probably clicked on your link during testing after which :link no 
longer applied.  As the spec says, "The :link pseudo-class applies 
for links that have not yet been visited."

ref:
CSS 2.1 Specification
5 Selectors
5.11.2 The link pseudo-classes: :link and :visited
http://www.w3.org/TR/CSS21/selector.html#link-pseudo-classes

The rule "#divBox p a" will then apply to ALL links in ALL paragraphs 
inside #divBox.  If you need to target some links or paragraphs but 
not all, you'll need to apply further ids or classes to get as 
specific as necessary.

Aside, you'll get much higher quality feedback from technical 
listserves such as this if you'll include the actual markup your 
styling will apply to -- preferably by linking to an HTML page on a 
server somewhere.  A test page works fine if you can't link to your 
live material.

Regards,

Paul
__________________________

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to