Old 26-03-2007, 07:34   #1 (permalink)
harvey
Registered User
 
Join Date: Mar 2007
Posts: 2
Overide CSS Float

Hi,

I'm sure this is simple.

I have a content div and have set the following to float all images inside it to float to the right:-

Code:
#content img { float:right; ........ }

This works perfectly. I now have a one-off image that I don't want to float to the right but to the left. I have added a class selector to this images in the hopes that I could just define a float:left; to it but nothing seems to work.

What is the best way to achieve this?

Thanks
Harvey
  Reply With Quote
Old 26-03-2007, 07:42   #2 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,012
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
#content img {
float:right;
}

#content img.className {
float:left;
}
__________________
  Reply With Quote
Old 26-03-2007, 08:40   #3 (permalink)
skyrocket
SkyRocket Design
 
skyrocket's Avatar
 
Join Date: Aug 2005
Location: Chichester
Posts: 536
Quote:
Originally Posted by harvey
What is the best way to achieve this?

what da man said except i'd add if it's IE6 or older you'll need to cross your fingers, pray fervently to your God, spin around 3 times with ruby slippers on, take the red AND the blue pill then maybe - just maybe it could work
  Reply With Quote
Old 26-03-2007, 08:47   #4 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,012
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
?

__________________
  Reply With Quote
Old 26-03-2007, 09:49   #5 (permalink)
harvey
Registered User
 
Join Date: Mar 2007
Posts: 2
Typical, the only way i didn't try. Thanks guys, worked a treat
  Reply With Quote
Old 27-03-2007, 04:01   #6 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
You probably want to familiarise yourself with specificity

Specificity | HTML Dog
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 27-03-2007, 10:53   #7 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,434
i should read that too ... instead of just guessing ....

maybe one day ...
__________________
fuck signatures
  Reply With Quote
Old 27-03-2007, 18:18   #8 (permalink)
achtungbaby
Validate *this*
 
Join Date: Mar 2007
Location: Los Angeles CA
Posts: 19
Quote:
Originally Posted by weldo
i should read that too ... instead of just guessing ....

maybe one day ...
The bright side is that if you're guessing over and over and over again, day after day, eventually you begin to find the right answers
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8