Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7587509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:41:32+00:00 2026-05-30T19:41:32+00:00

I would like to write up some css/html for container boxes that I can

  • 0

I would like to write up some css/html for container boxes that I can put on my site in various places (ie- to draw out modules like a calendar on the site’s sidebar).

I have 5 images: left, right, top, bottom and background for the div.

The top image is 37 px tall, the bottom image is 22 px tall.

I would ideally like to specify a div height/width and then have it draw the div with the images on the top/bottom/right/left sides, autosized to the div’s proportions and not overlapping with each other. I would assume that youd want to use absolute positioning for the non-overlapping bit, but I’m completely unsure of how to make the images resize and stick to each side.

Here’s the (very bare) code that I have right now:

#top {background: url(container_top.png) no-repeat;}
#container {background: url(container_left.png) no-repeat;}
#right {background: url(container_right.png) no-repeat;}
#bottom {background: url(container_bottom.png) no-repeat;}

<div id="top">
   <div id="container">
       Content post
   </div>
   <div id="right"></div>
   <div id="bottom"></div>
</div>

The only other caveat is that I only want the top/bottom images to scale horizontally (not to resize on the y axis as well), and the left/right images to scale vertically (not to resize on the x axis as well).

For reference, my images are named:
“container_.png”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:41:33+00:00Added an answer on May 30, 2026 at 7:41 pm

    there are a few options. First one is to create four corner divs and four side divs, using the corner images at each corner and a repeatable image for the sides. You can also use a kind of “sliding-door” technique. And if you’re a brave guy, use css3 border-images (checkout http://w3schools.com/cssref/css3_pr_border-image.asp)

    option one:

    <div class="box">
        <div class="top">
           <div class="top-left"></div>
           <div class="top-right"></div>
        </div>
    
        <div class="content">
            <div class="left"></div>
            <div class="content">Lorem ipsum dolor sit amet</div>
            <div class="right"></div>
        </div>
    
        <div class="bottom">
            <div class="bottom-left"></div>
            <div class="bottom-right"></div>
        </div>
    </div>
    
    .top { background: url('repeatable.png') repeat-x; }
    .top-left { background: url('top-left.png') no-repeat; }
    .content .left { background: url('repeatable') repeat-y; }
    ....
    

    for sliding door technique, checkout http://www.google.com/?q=google+css+sliding+doors

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to write some scripts in python that do some automated changes
I would like to write a command line tool that passes some formatted text
I'm trying to write some LINQ To SQL code that would generate SQL like
I'd like to write a function that would have some optional code to be
I would like to write a CSS selector rule that selects all elements that
I would like to write some data to a file in Ruby. What is
I would like to write some Objective-C code for distribution. What is the best
I have a quad core machine and would like to write some code to
I would like to write an simple application able to retrieve some certain data
I would like to have some functionality by which if I write <textarea maxlength=50></textarea>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.