Thomas Kremmel
Thomas Kremmel

Reputation: 14783

Border overlaps form when window is resized

I have a form surrounded by a border. When the window is resized the border sometimes overlaps the form. This should not happen.

See the fiddle output:

http://jsfiddle.net/sdSdW/embedded/result/

Can someone tell me what I have to change in my source to make the border surrounding my form, keeping a distance between the form and the border even if the window is resized. I do not want to make the border fixed width (if not really necessary)

See the fiddle source:

http://jsfiddle.net/sdSdW/

Upvotes: 0

Views: 145

Answers (1)

Dipak
Dipak

Reputation: 12190

You don't need many parents for the border. You can add the border to fieldset itself

try -

fieldset {
    border: 1px solid #DDDDDD;
    margin: 0;
    padding: 40px;
}

JSFiddle

Upvotes: 1

Related Questions