CSS wont apply to the code
For some reason why i try to add a CSS style to a specific section of my ASP.NET code, it does seem to work at all?
Yes, i do have the stylesheet connect and i know it is because its working on other parts of the code EXCEPT new changes i am making right now.
Ive tried removing and adding back older codes where it does work and they apply just fine but for this part like shown in the image, it doesnt. I am testing this by adding a background color to the 'div' tag and making it red as well as making the color of the text red but as shown, nothing happens and they text is simply black and no background color even appears
21 Replies
What does it look like in dev tools?
Both the html element and the CSS file?
Dev tools?
Open browser, right click, inspect element; or hit f12
this?
That's part of it. Pop out the dev tools.
Look in the elements tab, and the sources tab.
uhhh, yeah im not 100% if im even doing it right š
You're not, but you're learning.
Look in the menu ribbon of the dev tools. On the left hand side, there should be a "pop out" button
Click it.
Do all your client side testing here in dev tools.
do you by chance know what the icon of the pop-out button looks like? I dont think i am seeing it at all
It's called "undock", sorry
Just use the mouse and wait for the tooltip
oh! i found it
Usually a good idea to have the browser and tools open side by side on different windows so you can see changes in real time.
:blobnod: thank you!
ive noticed however, the div style elements i applied isnt showing up
You can use the console to run JavaScript functions or examine the contents of vars.
Yeah open the stylesheet in sources tab.
And look at your specific css selector
Likewise look at the element tabs and see what the html looks like
:thinkingPonderingPikachu: finding all these tabs seems a bit difficult, not sure where they are
found them, my bad
š
yep, the .recommendation didnt even appear
added it and now it works
but why wouldnt it work in VS?
May have been cached.
Do a hard refresh in the browser.
turns out it something to do with read-only files. the entire project seems to be a read-only file
im sending it thru github between a few of my class mates for a project so im not sure if thats the issue