Page 1 of 1

Solid border

Posted: Sat Mar 13, 2004 10:04 am
by andylyon87
Hey guys
wondered if anyone knew how I would be able to create a solid borde to an input box, its something like

Code: Select all

lightbordercolor=#ffffff; darkbordercolor=#ffffff

Posted: Sat Mar 13, 2004 10:13 am
by vigge89

Code: Select all

<input type='text' name='someinput' size='20' style='&#1111;b]background-color: white; border-style: solid; border-width: 1px; border-color: black;&#1111;/b]' />
im not sure about light & dark colors however...

Posted: Sat Mar 13, 2004 11:50 am
by no_memories
But with CSS and form elements, there is an inconsistency with various browsers. Keep in mind, Mozilla, Opera, and Internet Explorer all have differences with some CSS, especially when it comes to forms.

It's one of the Achilles’ Heals of CSS right now. If you want your form to look more or less the same when styled with CSS in various browsers, try experimenting with background images in the various inputs.

For a button you could insert style similar to this:

Style:

Code: Select all

#someid &#123;
border: none;
color: #fff;
background: transparent url( yourimage.png );
height: 15px;
width: 40px;
&#125;
input:

Code: Select all

<input type="submit" value="" title="Use this instead of VALUE for describing a background imaged button" id="someid" />
Notice the value of the input is nothing. Make sure to have a transparent background so the image can show through. To validate without a warning, use a generic color in your style.

The height and width should match the background image size.