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
-
It's called precedence, in-line always prevails over style sheet, you gave them equal importance, and the wrong one lost 😊
-
@nbamaral but I _moved_ the styles. I didn't copy them. There is no duplicating going on. The ONLY styles available are the ones I moved from online to style sheet. None inline. Only in stylesheet.
-
dreik14128y@stackodev css is cascading, so please check if the style.css link is in the right place. If you have overridden any styles from a framework such as bootstrap, you'll need to link your stylesheet after other stylesheets.
-
pmarius868y@stackodev the css needs to be loaded in the same order.
So if the css in the index file was loaded before the style.css, when you move it it also has to be before the rest of the css from there. -
eybro5268y@stackodev imo you should try to disable cache (in chrome it's in the console, under Networking).
The index.php is normally never cached, but style.css could be cached for a while. -
@stackodev
I know you did, but when they are loaded from the page they have a greater specificity than when they're imported from a style sheet.
This can alter the final result, but shouldn't not really break the whole page. Try move them to it's own sheet loaded last.
Related Rants
STUPID STYLESHEETS!
I've got styles in index.php and styles in style.css. When I move the styles in index.php over to style.css THE WHOLE SITE BREAKS!?!?!?
ALL I DID WAS MOVE THEM! NO OTHER CHANGES!!!
I REALLY HATE CSS.
undefined
frontend
css sucks