SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: Rounded Box Design

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2009
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rounded Box Design

    I have a rounded box design that I want to modify to use DIVs instead of tables. I have been trying for several hours and I can't get it working right.

    I am using this code now

    HTML Code:
    <table class="rounded-box">
            <tr>
                <td class="top-left"></td>
                <td class="top"></td>
                <td class="top-right"></td>
            </tr>
            <tr>
                <td class="left"></td>
                <td class="content">
                </td>
                <td class="right"></td>
            </tr>
            <tr>
                <td class="bottom-left"></td>
                <td class="bottom"></td>
                <td class="bottom-right"></td>
            </tr>                
        </table>
    I was trying to use the article on this website to help me but its not helping. I need to have support for top and bottom images, because I use a 3D rounded box. But this article does not support them.

    I cannot figure out how to modify the code to use DIVs and use top/bottom and corner images.

    Can anyone help?

    http://articles.sitepoint.com/articl...s-boxes-curves

  2. #2
    Unobtrusively zen silver trophybronze trophy
    SitePoint Award Recipient paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,212
    Mentioned
    40 Post(s)
    Tagged
    0 Thread(s)
    Here are five different rounded box techniques for you to pick and choose from. The video tutorial runs through the pros and cons of each technique too.

    http://css-tricks.com/video-screenca...unded-corners/
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2009
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.

    I've already used those options, but my question is related to making a box that supports a top and bottom images, not just corner images. I am using a 3D box so I also need support for top and bottom images.

    None of those examples on that video use top and bottom images.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    SitePoint Award Recipient paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,212
    Mentioned
    40 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MrGeeker View Post
    Thanks.

    I've already used those options, but my question is related to making a box that supports a top and bottom images, not just corner images. I am using a 3D box so I also need support for top and bottom images.

    None of those examples on that video use top and bottom images.
    I beg to differ. The first example in the vieo and on the demo page uses a single solid image for the top and the bottom parts of the rounded box.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Zealot
    Join Date
    Dec 2009
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    I beg to differ. The first example in the vieo and on the demo page uses a single solid image for the top and the bottom parts of the rounded box.
    Excatlly,
    And if you've watched the video, he'll state that the problem with this design is that is does not allow the box to expand when new content is added. Its impossible to have a box using only those images that can expand. You need a box that is divided as I've done in my code example.

    You cannot make a 3D box with a top and bottom, you need 8 images to make a 3D box.

    If you'd look at the code example I've provided you'd see that I'm trying to do something completely different.

    My code works correctly, I need to get it working with DIVs, as I don't want tables in my design.

    I'll figure it out this afternoon.

  6. #6
    Unobtrusively zen silver trophybronze trophy
    SitePoint Award Recipient paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,212
    Mentioned
    40 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MrGeeker View Post
    Excatlly,
    And if you've watched the video, he'll state that the problem with this design is that is does not allow the box to expand when new content is added. Its impossible to have a box using only those images that can expand. You need a box that is divided as I've done in my code example.

    You cannot make a 3D box with a top and bottom, you need 8 images to make a 3D box.
    With a solid top and bottom you will always be able to expand in height. It's the inability to expand in width that he's complaining about, which is a natural byproduct of using a fixed top and bottom that you seem to be wanting in the first place.

    We look forward to your experiments.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #7
    SitePoint Zealot
    Join Date
    Dec 2009
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't do a 3D box with only a top and bottom either, its impossible

    It's fine I figured out how to do it myself using DIVs today.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •