titlu titlu - 2 months ago 6
CSS Question

Why my css changes are not getting reflected?

My css changes are not getting reflected in

html5
, there's no braces problem I also did ctrl + f5 and I ran the same code in some other path and also I ran it in some other browser but the problem seem to be there .

Here's my HTMLs code :



.div1 {
max-width: 50%;
border: 1px;
/*background-color : "red";*/
}
.div2 {
max-width: 50%;
/*background-color : "blue";*/
}
.div3 {
max-width: 50%;
/*background-color :"green";*/
}

<div class="div1">p</div>
<div class="div2">q</div>
<div class="div3">r</div>





Could someone please tell me what I am doing wrong ? any of CSS change is not reflected I see white document without any div

Answer

your border syntax is wrong, because you are not setting a border-style.

the formal syntax is this one:

<br-width> || <br-style> || <color>

Here are the values:

<br-width>

Default value medium is used if absent. See border-width.

<br-style>

Default value none is used if absent. See border-style.

<color>

A <color> denoting the color of the border. If not set, its default value is the value of the element's color property (the text color, not the background color). See border-color.


.div1 {
  max-width: 50%;
  border: 1px solid;
  /*background-color : "red";*/
}
.div2 {
  max-width: 50%;
  /*background-color : "blue";*/
}
.div3 {
  max-width: 50%;
  /*background-color :"green";*/
}
<div class="div1">p</div>
<div class="div2">q</div>
<div class="div3">r</div>

Comments