PDA

View Full Version : Resizeable div box(s)? +rep



Moh
08-10-2010, 04:36 PM
What would be the best method to create a box (with graphical corners) that you can set the width and will still be the perfect shape?

For example say you wanted to make this box resizeable:

http://images.habbo.com/habboweb/60_cf3b27a092308ed2f4b382d9929147fc/8/web-gallery/v2/images/box.png

So if it was done by tables, it would the frame would look like this:
http://i53.tinypic.com/fw6mmr.jpg

hamheyelliot
08-10-2010, 05:25 PM
Here's some CSS you can use to get that effect, just in case that's better for you:

#box {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
border: 1px solid #ccc;
border-bottom: 2px solid #ccc;
padding: 10px;
width: 200px;
height: 100px
}

Just put that in a stylesheet (after changing the height and width) and in your html use: <div class="box">Your text here</div> and you should get something almost identical to that without tables.

Moh
08-10-2010, 09:23 PM
Here's some CSS you can use to get that effect, just in case that's better for you:

#box {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
border: 1px solid #ccc;
border-bottom: 2px solid #ccc;
padding: 10px;
width: 200px;
height: 100px
}

Just put that in a stylesheet (after changing the height and width) and in your html use: <div class="box">Your text here</div> and you should get something almost identical to that without tables.





I used that image as an example, the image I'm using can't be done by css borders. Thanks though :)

I'v worked it out now :P

Want to hide these adverts? Register an account for free!