Border outside of Form!

Kash_Designer
avatar
rank Regular

Regular


Posts: 26
Joined: 2007-06-21

Hello Everyone,

I am trying to have a border around my input text field box

Here is the site http://kevinkashou.com/test.html where I am having trouble with. I have a picture of what I am trying to do and the html portion is right after that. YOu can see what I am getting instead.

.border {
width: 146px;
height: auto;
margin: 0px;
padding: 2px;
border: 1px solid #FFCC33;
}

.margin {
width: 150px;
height: auto;
margin: 0px;
padding: 0px;
font-size: 10px;
color: #999999;
}

HTML
<span class="border"><input type="text" class="margin" value="Type Here. . ." /></span>

Any Idea?

Thanks

Hugo
Hugo's picture
rank Moderator

Moderator


Posts: 11958
Joined: 2004-06-06
Location: London

You could set the .border

You could set the .border element to 'display:block' and give it a width of 154px or no width and float it left to take advantage of 'shrinkwrap' but that might not be advisable as there is only a test case without real layout aspects to take into account and some browsers might not handle the 'shrinkwrap' nature of floats.

Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Kash_Designer
Kash_Designer's picture
rank Regular

Regular


Posts: 26
Joined: 2007-06-21

Thanks Hugo, It works like

Thanks Hugo,

It works like a charm; just needed that display: block.