Border outside of Form!
Posted: Sun, 2008-05-18 04:55
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


Moderator
Posts: 11958
Joined: 2004-06-06
Location: London
You could set the .border
Posted: Sun, 2008-05-18 10:19
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
Regular
Posts: 26
Joined: 2007-06-21
Thanks Hugo, It works like
Posted: Sun, 2008-05-18 15:04
Thanks Hugo,
It works like a charm; just needed that display: block.