Repository navigation
Simple CSS code inside <style> tag or in an external css file which leads to incorrect rendering #126
Unanswered
altagore
asked this question in
Help / Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello all,
When I put CSS code in a <style> tag to put a border around a div element, below my div block appear three borders nested inside each other. I have the same problem if I put the CSS code in an external file. Please note that I use Chrome as my browser.
<!DOCTYPE html><html><head><meta charset="utf-8"><style>div {border: 1px solid red;background-color: antiquewhite;left: 10px; margin: 10px}</style></head><body><div>Bloc div</div></body></html>A copy of the result is shown below:
If, on the other hand, I directly put my CSS code by assigning it to the style attribute of the div element, I no longer have this problem.
I have the same problem with Ritwick Dey's Live server extension and with the Live Server (Five Server) extension.
I would like to point out that when I open my file directly with the browser, all is ok.
Thanks for your help
All reactions