Jump to content

Strange css behaviour


lindm

Recommended Posts

The following setup gives the text field the color I want (FF99FF):

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
.fb {background-color:#CCC;}
.c {background-color: #FF99FF}
</style>
</head>

<body>
<input type="text" name="test" id="test" class="fb c"/>
</body>
</html>

 

The setup I need to use does however not (changed .fb to input|type="text"])..anyone know why?

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
input[type="text"] {background-color:#CCC;}
.c {background-color: #FF99FF}
</style>
</head>

<body>
<input type="text" name="test" id="test" class="fb c"/>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/183326-strange-css-behaviour/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.