CSS style in HTML-header of HTML template is problem! #17004
-
I just started a small project with a pi pico W controller. The controller uses Wifi so I can control it from my mobile phone. So I created in the head-section of the HTML-page a style-section:
With an empty Style-section the controller works fine. But whenever I fill it with some CSS-code the controller crashes (reinitializing). |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
It's certainly possible to add .css code in the header. I insert a substantial block of css code into web pages I generate on the fly. The html I use is: Looks like you need |
Beta Was this translation helpful? Give feedback.
-
Sorry, what I showed you works fine with a whole files worth of css for me. As this isn't really a Micropython issue you might be better asking on an HTML / CSS forum . |
Beta Was this translation helpful? Give feedback.
-
Hi Gerd, your html is an F-string, where the curly braces {} have a special meaning. |
Beta Was this translation helpful? Give feedback.
It's certainly possible to add .css code in the header. I insert a substantial block of css code into web pages I generate on the fly.
The html I use is:
<style type="text/css"> css code here </style>
Looks like you need
type="text/css"
.