Solid border

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

Solid border

Post 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
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post 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...
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post 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.
Post Reply