Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 2037 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Override CSS

Thread title: Override CSS
Closed Thread    
    Thread tools Search this thread Display Modes  
06-11-2008, 04:43 AM
#1
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old  Override CSS

I have this in my css file,

Code:
h1,h2,h3,ul,p,li{
	margin: 0; padding: 0;
	
}
And I want to no how to override it for a certain div.

I already tried something like.

Code:
#div h1,h2,h3,ul,p,li{
	margin: 5; padding: 5;
	
}
But no luck.

06-11-2008, 05:02 AM
#2
rochow is offline rochow
rochow's Avatar
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
 
Posts: 297
iTrader: 4 / 100%
 

rochow is on a distinguished road

Send a message via MSN to rochow Send a message via Skype™ to rochow

  Old

Originally Posted by Jako View Post
I have this in my css file,

Code:
h1,h2,h3,ul,p,li{
	margin: 0; padding: 0;
	
}
And I want to no how to override it for a certain div.

I already tried something like.

Code:
#div h1,h2,h3,ul,p,li{
	margin: 5; padding: 5;
	
}
But no luck.
#div h1, #div h2

Putting h2,h3,ul just overrides the defaults

06-11-2008, 05:07 AM
#3
Garrett is offline Garrett
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
 
Posts: 2,694
iTrader: 11 / 100%
 

Garrett is on a distinguished road

Send a message via MSN to Garrett

  Old

Also check the "5" it should be "5px", or "5em".

Or you can use !important, if it doesn't seem to work.

so, margin: 5px !important;

06-11-2008, 02:46 PM
#4
MishieMoo is offline MishieMoo
MishieMoo's Avatar
Status: I'm new around here
Join date: Jun 2008
Location: New York, NY
Expertise:
Software:
 
Posts: 11
iTrader: 0 / 0%
 

MishieMoo is on a distinguished road

Send a message via AIM to MishieMoo Send a message via MSN to MishieMoo

  Old

Also check to see what #div is. To css #div means something with id="div" if you want to just change something for one div, add a special id do it id="special" for example and then change the css to:
HTML Code:
#special h1, #special h2, #special h3...(etc){
margin:0; 
padding:0;
}

06-12-2008, 04:30 PM
#5
Wildcard is offline Wildcard
Wildcard's Avatar
Status: Member
Join date: Jul 2006
Location: soundwave.
Expertise:
Software:
 
Posts: 379
iTrader: 12 / 100%
 

Wildcard is on a distinguished road

Send a message via MSN to Wildcard

  Old

Yup. Define the div and each of the sub contents

HTML Code:
#div h1, #div h2, #div h3 etc.

Closed Thread    


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

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed