+ 1
So, I am having this problem where I select an element with css.
If I style the element, the browser is selecting only certain properties and leaving out others.I have tried out everything and I am out of options
7 Answers
+ 1
there may be other css rules that override your #day or h1, still not 100% sure though.
best way to find the problem is by using developer tools then go to elements panel. click on the element that doesnt work properly, then see the styles applied to that element. you can see if any of your rules are being overriden
0
have any code for us to analyze ?
0
One using an id selector for a div element
#day {
display:flex;
flex-direction:column;
justify-content:center;
}
For this element none of the styles are showing.Another is a h1 selector
h1{
font-size:30px;
font-family: "...";
font-weight:lighter;
}
for the h1 selector it has only applied the font-family. I have tried clearing cache. Refreshing the browser. Even disabling cache but nothing is working.
0
I am not loading bootstrap that's for sure. Even using !important on all values that weren't loaded isn't working. I have checked the developer tools. At first on the browser the #day selector wasn't showing. It started when I included that selector but after a number of browser refresh all the properties are there and still nothing has changed. I don't understand if its a php file causing it because a php file is directly linked to the css file
0
maybe there's a typo somewhere that makes some rules invalid.
or check network panel and see if the css are loaded.
but the css properties shouldnt shown in devtools if those are the case.
maybe use other browsers and see if its working, or isolate the css file then test every single one of the rules with static plain html page to test if php has something to do with it.
0
You were right, a css property was being overriden. The justify-content property for the div element and the rest have just observably been rectified
0
bonjour