apply a style to ALL links EXCEPT...

This is a discussion on "apply a style to ALL links EXCEPT..." within the Web Page Design section. This forum, and the thread "apply a style to ALL links EXCEPT... are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 5th, 2006, 11:25
Junior Member
Join Date: Jun 2006
Location: Philippines
Age: 20
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
apply a style to ALL links EXCEPT...

i have this css declaration:

Code: Select all
a:active { 
   position: relative; 
   right: -1px; 
   bottom: -1px;
   }
and i want it to apply to ALL links EXCEPT a img UNLESS the link has a class of "image".

this is because i'm using lightbox, and when the corner [ x ] is clicked on to close, it keeps moving and it won't close so you're stuck in the lightbox. i was thinking of making the [ x ] bigger but that ruins the image. then i tried applying different position declarations on a.image but that didn't work, i was thinking of selecting each link by contextual selectors except a.image but that just bloats my CSS.

so can this be accomplished with cross-browser compatible CSS or would it be more efficient to use a very short JS script??

help is much appreciated!
Reply With Quote

  #2 (permalink)  
Old Sep 5th, 2006, 18:14
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: apply a style to ALL links EXCEPT...

Code: Select all
a:active img, .image {
    right: 0;
    bottom: 0;
}
This should do the trick. I'm not sure how IE will handle "a:active img" though, but it's correct code.
Reply With Quote
  #3 (permalink)  
Old Sep 6th, 2006, 10:39
Junior Member
Join Date: Jun 2006
Location: Philippines
Age: 20
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: apply a style to ALL links EXCEPT...

thanks ryan! i found a solution by inserting the class "image" into the close links of lightbox through the lightbox.js and assigned this style to that class:

Code: Select all
a.image:active {
  position: static;
  right: 0;
  left: 0;
}

Reply With Quote
Reply

Tags
apply, style, links, except

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Fackbook style links and anchors jelly46 JavaScript Forum 2 Apr 20th, 2008 20:57
Apply transition to a div blkskull JavaScript Forum 0 Feb 26th, 2008 14:00
How to tell IE7 to use a pariticular style in a single style sheet figo2476 Web Page Design 5 May 25th, 2007 14:23
Can you apply image replacement a ul? rubyfruit Web Page Design 4 Oct 12th, 2006 02:35
Beginning to Apply my skillz... courtjester Classic ASP 7 Apr 5th, 2004 10:18


All times are GMT. The time now is 04:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43