So I have a normal html file with tags like and etc.
I have this css file:
html, body {
margin:0;
padding:0;
backgound-color:blue;
}
a {
/* Note: For whatever reason this does not apply to templates/tags/naviagtion.html */
text-decoration: none;
}
For whatever reason when this is applied to my html file via:
<link rel="stylesheet" type="text/css" href="/static/css/base.css" />
Note: the is placed in base.html which it the base template. The background of the body and the text-decoration of the link does not change to the css style. Other tags like div change their width, float, etc to the style of the base.css file. When I go and personally edit the tag via style=”” in the tag, the attributes are applied. Why do the styles get applied with style=”” and not from the css file. I have no inline css in the base.html file that overrides anything. Also, the attributes such as margin and padding for html, body from the css file get applied while the background-color doesn’t. What is going on?
Thanks!
The base.html file pretty much looks like this
....
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/base.css" />
</head>
<body>
<!--
<div class="left_holder" >
</div>
-->
<div class="center_holder" >
<div id="top_1" >
<div id="search" class="top_left" >
<!-- [ searchbar ] -->
{% include "tags/search.html" %}
</div>
....
the navigation.html file:
<div><a href="/" >Home</a></div>
Sorry there won’t be a url since this is on localhost
Spelling error fixed. Also css is case sensitive.
You said text-decoration:none is not getting applied.
Did you mean that you see an underline below the link or you see an outline after clicking?
You should not see an underline if you have text-decoration:none; in your css.
If you see a border or ouline, try adding outline:none; as well to the css for a{}