Aditya Aditya - 5 months ago 24
Linux Question

box-shadow is not recognized

I have this CSS code for a textbox class and I'm on working on linux.
It's saved in a .css file and i'm using gedit. But the box-shadow property isn't recognized. All the others have that different font which shows a keyword or so. But not box-shadow. Any ideas please? It seems to work on windows when i use notepad++.

.textbox
{
background: white;
border: 1px solid #ffa853;
border-radius: 5px;
box-shadow: 0 0 5px 3px #00FFFF;
color: #666;
outline: none;
height:23px;
width: 275px;
}

Answer

You may be confusing box-shadow with text-shadow. text-shadow applies to text, box applies to containers

I have made a small fiddle to demonstrate both

div {
  width: 200px;
  height: 300px;
  background-color: #fff;
  box-shadow: 10px 10px 5px grey;
}
p {
  text-shadow: 1px 1px 2px black;
  color: red;
  font-size: 5em;
}
<div>
  <p>
    hello
  </p>
</div>

if you are trying to adjust the appearance of an input (or a number of inputs) a useful way of doing it is:

input[type="text"] {
    /*your styles here*/
}