Reputation: 9
This is a weird problem which I have been getting when linking my html file to a css file. I am running the app using Flask on PyCharm.
**static\style.css**
body {
color: #fffa;
}
**templates\base.html**
...
<link rel="stlyesheet" href="{{ url_for('static', filename='style.css')}}">
...
<body>{% block content %} {% endblock %}</body>
**templates\home.html**
{% extends 'base.html' %}
...
{% block content %} example {% endblock %}
As a result, the string 'example' is printed on the website as I am able to highlight it but it appears to be "invisible" as I cannot see the texts without the manually selecting them (i.e., the screen is just blank perhaps due to text being white?) but I cannot prove the latter because even when I change the color in css to black or red it just remains invisible.
Upvotes: 1
Views: 95
Reputation: 76
Everything is working as it should be. #fffa
will be treated probably as your browser as white(ish). And you are applying it to whole body
.
And if background color is set to white too (and probably it is by default) - then you can't see text.
If you want to see black text - you should set it to black
or #000
.
https://en.wikipedia.org/wiki/Web_colors#Basic_colors
Upvotes: 1