Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background color to be same as text color

Tags:

html

css

Currently I have the following code.

#Image_ID {
    color: #000066;
    font: normal 10pt Verdana, Helvetica, Arial;
    background: none;
    border: none;
}

This makes my Input Box white and gets rid of the border. But when a value is entered the value is a black color. What I want is so that when text is entered that it is the same color as the background so that it is virtually invisible.

like image 765
Michael Downey Avatar asked Oct 20 '25 16:10

Michael Downey


2 Answers

Automatic background color to be the same as the specified color of the element, without specifying it manually can be done using the currentColor value for the background property.

body {
  color: black;
  background: currentColor;
}

Browsers support is excellent.

like image 170
vsync Avatar answered Oct 23 '25 07:10

vsync


This should do the trick.

#Image_ID:focus {
    color: transparent;
}
like image 25
Mark Avatar answered Oct 23 '25 05:10

Mark