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
https://forums.phpfreaks.com/topic/166946-padding-in-div/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.