style sheet problem in asp net

0

I use visual studio 2012. I'm working with asp net. I have a style sheet inside a folder and referenced it in an aspx page. When I create a new html tag, a <h3> for example, and make simple modifications in the style sheet as the color of the element, sometimes it happens that this modification is not applied, that is, <h3> is with the default color. However, if I put <style></style> and the modifications in aspx itself they are applied. It does not matter if it is by class or id, this is sometimes happening. To solve this, I can also copy the contents of the style sheet that is no longer working and paste it into a new style sheet. Strange, is not it? This is happening frequently, why will it?

Note: I updated the page and opened another one, but the problem persisted, only resolved as I said above.

    
asked by anonymous 20.11.2016 / 22:13

2 answers

3

It is probably the browser's cache. When this happens reload the page using ctrl + R.

When you access a page, the browser saves the files in memory to load faster later. Then when you reload the page it takes the files from memory instead of taking what you have edited.

    
20.11.2016 / 22:55
0

Complementing Rafael's responses, make sure the css file is set correctly, for example:

<head>
<title>Exemplo</title>
<link href="custom.css" rel="stylesheet" />
</head>

Another question is to check if there is another classe or Id element of CSS itself or another, is not interfering with the property you want to change or set. Remember, you can give greater importance to ownership, as follows:

.teste {background-color:#808080 !important;}
    
21.11.2016 / 19:22