I don’t know if there’s a different Css usage in Asp.net but I just can’t make it work.
I target my .css file with
<link href="Style/Style.css" type="text/css" rel="Stylesheet" />
code.
And there are <div> and <table> elements.
The table has an id and its properties in the css file are working normal. But I can’t say the same thing about <div> and <a> tags.
Let’s take this example:
<div align="center" id="bla">
And I use id in css file in different ways. I first used #bla { } or div#bla or div #bla { }, then I used .bla { } or div.bla { } or div .bla { } with making class="bla" instead of id="bla" in Aspx page, they all did not work.
But when I moved the code from css file to Aspx file between <style type="text/css"><style/> tags, it worked normal.
The same behaviour happens in <a> too. But it does not in <table>.
Is there a different usage? What do I miss?
More info at http://jsfiddle.net/npTc6/
It could be a pathing issue to your CSS file. If you have multiple CSS files, it could also be the order of your CSS files. You should verify that you have the correct path to your CSS file and that you have the correct file name referenced in your code. Often, the most simple mistakes are the most frustrating.
UPDATE:
Your CSS has a space between the “a” anchor and the class name, and I believe you need a leading slash on your image references (if not there already).
Example:
try…