Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Some css properties don't work

Tags:

html

css

I want to place noscript tag like on this (stackoverflow) page:

<noscript>Your browser has JavaScript turned off !</noscript>  

But, commented properties doesn't work:

noscript{
    width:100%; // I want it to be 100% of parent container width - it's not.
    text-align:center;
    background-color:crimson;
    color:white;
    font-weight:bold;
    margin-top:10px; // doesn't work
    padding-top:7px;
    margin-bottom:10px; // doesn't work
    padding-bottom:7px;
}
like image 889
Alegro Avatar asked Dec 08 '22 22:12

Alegro


1 Answers

noscript is not a block element. Put a DIV or any other block element inside your noscript element and then attempt to style it.

like image 59
gn1 Avatar answered Jan 06 '23 21:01

gn1