NPadrutt
NPadrutt

Reputation: 4257

style not applied when moved to site.css

I'm pretty new to html / css / asp.net so please bear with me..

I have thsi HTML code to have my custom style on a table:

<head>
    <style>
        table {
            font-family: arial, sans-serif;
            border-collapse: collapse;
            width: 100%;
        }

        td, th {
            border: 0px solid #dddddd;
            text-align: left;
            padding: 8px;
        }

        tr:nth-child(even) { background-color: #dddddd; }
    </style>
</head>

<table>
    <tr>
        <td>Deltavista</td>
        <td>
            <Button>Download</Button>
        </td>
    </tr>
</table>

This is used in a default asp.net mvc page. In the _Layout.cshtml the styles is inluded this way:

@Styles.Render("~/Content/css")

And the bundle in the BundleConfig.cs looks like:

        bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/site.css"));

When I now move the code from the style tag in the head to site.css the custom style isn't applied anymore. What am I doing wrong?

Upvotes: 0

Views: 75

Answers (2)

Espi
Espi

Reputation: 76

Try to clear your browser cache, or try using a different browser to view the page. Browser caching can make you pull your hair out sometimes.

Upvotes: 0

Luciano Azevedo
Luciano Azevedo

Reputation: 508

try to delete the cookies in browser and files temporaries

Upvotes: 1

Related Questions