1 (edited by newera70 2004-09-11 11:11)

Topic: HTML help plz

Ok i have made a member login for my site it doesnt work to log in i can fix that i made it not owrk on purpose i basically am just making the layout right now then ill do everything else so anyways the box you type the username and password into which is white is there a way to change the color of the box?


<div class="text" >username:  <input type="text" style="height:17; color:000000; font-size:10px; width:120; border:0" class="bg"><br>
password:  <input type="password" style="height:17; color:000000; font-size:10px; width:120; border:0" class="bg">    <a href="#"><img src="images/log.jpg" border="0" align="absmiddle"></a></div>
</td></tr>
        
        </table>
        </td></tr>

Re: HTML help plz

well i figured out how to replace the anyoying white box with a image but still cant someone tell me if its possible to change the color....

3 (edited by Paul 2004-09-11 14:52)

Re: HTML help plz

See here.
http://www.sitepoint.com/print/style-web-forms-css

BTW. A lot of the markup is wrong. Colour declratation with hex should be color: #000000. Height and width settings should specify units e.g. px, em etc. There is no need to use inline styles and classes, just use the class in the stylesheet. Width of inputs are better specified using the width attribute of the tag e.g. width="25" for 25 characters.

4 (edited by newera70 2004-09-11 21:49)

Re: HTML help plz

thanks BTW i have no clue what you are talking about can u give me another example using what i have above?

What do you meen the markup is wrong its working fine and doing what i want

Re: HTML help plz

Have u defined the class "bg" in ur style-sheet(css file).
Try this..

<div class="text" >username:  <input type="text" style="height:17; color:#000000; font-size:10px; width:120; border:0;" class="bg"><br>
password:  <input type="password" style="height:17; color:#000000; font-size:10px; width:120; border:0;" class="bg">    <a href="#"><img src="images/log.jpg" border="0" align="absmiddle"></a></div>
</td></tr>
        
        </table>
        </td></tr>
God wisely designed the human body so that we can neither pat our own backs nor kick ourselves too easily

Re: HTML help plz

another piece of code.

change the content whatever you want and also you can add any no of ids (#content0,#content1..) then use in the body of the html.

<html>
<head>
<style>
.txt{COLOR:#000000; FONT-FAMILY:verdana,arial; FONT-SIZE:11px; FONT-WEIGHT:none; TEXT-DECORATION:none;}
.input {border : 1 solid; border-color : #008800; background-color : #dedede; color: #000000; font-family: verdana, arial; font-size: 10px; font-weight: normal; width : 120px;}

#content0 {position:absolute; visibility:visible; background-color:#ffffff; font-family:verdana,arial; font-size:10px; color:#880000; top:17%; left:15%;}
<style>
</head>
<body>
<div id="content0">
<table cellspacing="0" cellpadding="3" border="0" width="200" align="center">
<tr><td class="txt">Username</td><td class="txt">:</td><td class="txt"><input type="text" name="username" value="" maxlength="35" size="20" class="input"></td></tr>
<tr><td class="txt">Password</td><td class="txt">:</td><td class="txt"><input type="password" name="pass" value="" maxlength="20" size="20" class="input"></td></tr>
<tr><td class="txt" colspan="3" align="center"><a href="#"><img src="images/log.jpg" border="0"></a></td></tr>
</table>
</div>
</body>
</html>
God wisely designed the human body so that we can neither pat our own backs nor kick ourselves too easily