i have a basic ques here.
m applying 3 stylesheets external on my html- S2,S3..
my all these SS have same one id on whose different styling is applied:
i need both s2 and s3 in my html. but i want only s3 to be applied for this particular id. now how to give priority .. !important is not good to use right?
Please, you’re on a forum asking for help. Not on a chat talking to your mates. Try making sentences with a meaning please. I’m facing some issues figuring out what you mean by:
> m applying 3 stylesheets external on my html- S2,S3..
> my all these SS have same one id on whose different styling is applied:
First of all, you shouldn’t have multiple stylesheets in most cases, only one.
Secondly, I think there is a problem if you apply styles on a same element from different stylesheets; all rules for an element should be gathered at the same spot.
Fixing these two things will probably fix your problem.
i am not able to explain properly i guess.
i have another ques:
below is the css:
margin: 0 auto;
margin: 0 auto;
i have a div here using both classes. Both classes i want to use as i am applying some jquery.
height also is different. and the class talkNowOptions is used across many divs and i am applying jquery on this class.
what should i do if for a particular div i want different width and height but i want to apply jquery on that also. what would be your suggestion?
There is no height property in the second class that you gave
If the height is different use a different class…don’t chain them unnecessarily. Although, **generally** the content should set the height.
If you are repeating styles then find a way of reducing that.
You need a hidden div centered div (although I wouldn’t) then give that a class of it’s own and apply it to both divs.
You will still apply two classes to the divs but the classes now do two separate things and your code is a lot neater and more compact.
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".