Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
What do you mean not working properly?
Css rules are applied in order of appearance on the same selector. So if you have
body { somerule: a}
Then
body {somerule: b}
The b rule will overwrite the a one. -
Ashmis294yso what should i do that my both element can perform well.
where should i insert the property values in css stylesheet. should i make a new body{}
or should i insert it in existing body{} -
fuckwit12164y@Ashmis new file. For every change. With a new body. Noonononoo
Just add it to one of the already existing matching selectors. -
ckfy344yMaybe it's just me, but modern front ends should rarely be working with css on the body tag anyway. Even more so with scoped css by modern frameworks. Always create a custom class when necessary to avoid affecting other components.
-
Styles on body are INTENDED to be THE SAME for every page so that shit doesn't look different everywhere!
If you need something specific, you insert some node in the markup and give it either a class if several of them can be on a page, or an ID if it can occur only once per page, and then you style that selector.
I'was adding a Contact us form in my website but it is not working properly.
I think the problem is in my css External stylesheet.
I've created it in css stylesheet like this:-
/* contact form */
body{
}
But there is another body element in css stylesheet
/* CSS Document */
body{
}
question