Jump to content

Padding in Div


everisk

Recommended Posts

I have CSS like and i try to position the input box inside the big box with the top padding of 15px. However, with the below code the bigbox get stretched downwards by 15px and the background image is just repeated (I know this can be fix easily but I dont want to have the bigbox stretched).

 

How do I position the input box 15px down from the top and the bigbox is still 49px? Thanks!

 

<div id="bigbox" style="height: 49px; background-image:url(../images/bigbox_bg.jpg); padding-top:15px;">
<input name="input_box" type="text" size="50" maxlength="250">
</div>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.