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 76057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:36:49+00:00 2026-05-10T20:36:49+00:00

What is a good way to set up a single container div with some

  • 0

What is a good way to set up a single container div with some border images surrounding it (in my case only on the left, bottom, and right sides)? I have it centered at the top of the page, overlapping everything else (so like that OSX-style slide-down dialog).

Here’s the basic layout:

alt text

Here’s what I’ve got so far (can I avoid a static width/height for the content?):

HTML:

<div class='contentbox'>     <div class='contentbox-wrapper' style='width: 400px'>         <div class='contentbox-mid' style='height: 200px'>             <div class='contentbox-w'></div>             <div class='contentbox-content'>                 Content Box Test             </div>             <div class='contentbox-e'></div>         </div>         <div class='contentbox-bottom'>             <div class='contentbox-sw'></div>             <div class='contentbox-s'></div>             <div class='contentbox-se'></div>         </div>     </div> </div> 

CSS:

.contentbox {     width: 100%;     position: fixed;     z-index: 2; }  .contentbox-wrapper {     width: 300px;     margin-left: auto;     margin-right: auto; }  .contentbox-mid {     height: 100px; }  .contentbox-w {     width: 30px;     height: 100%;     background: transparent url('../../images/contentbox_w.png');     float: left; }  .contentbox-content {     width: auto;     height: 100%;     background: #e8e8e8;     float: left; }  .contentbox-e {     width: 30px;     height: 100%;     background: transparent url('../../images/contentbox_e.png');     float: left; }  .contentbox-bottom {     width: 300px;     height: 30px; }  .contentbox-sw {     width: 30px;     height: 30px;     background: transparent url('../../images/contentbox_sw.png');     float: left; }  .contentbox-s {     height: 30px;     background: transparent url('../../images/contentbox_s.png');     margin-left: 30px;     margin-right: 30px; }  .contentbox-se {     width: 30px;     height: 30px;     background: transparent url('../../images/contentbox_se.png');     float: right;     position: relative;     bottom: 30px; } 
  • 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. 2026-05-10T20:36:50+00:00Added an answer on May 10, 2026 at 8:36 pm

    While none of this is recommendable (mixing markup and design), it’s often not the integrator who gets the final word. However, you should still attempt to keep everything as clean as possible.

    Your structure is pretty much the only kind of structure you can use to your ends, although if your width is static (300px?), I’d advise you to have your div background as one larger image repeated vertically.

    You’d then have a kind of footer within your div, where you could put the two bottom corners and the bottom picture all in one single image. Instead of having 5 divs inside one, you’d only have one. Note that in bigger environment, this also means the user can download 2 more images in parallel (4 max from a single host), making the overall download of the page faster.

    This obviously doesn’t work if your width is relative to the parent or can change in any manner though.


    EDIT: as it happens you specified the width is variable, I don’t think there’s a cleaner light way to do it HTML-wise.

    However, if you still want to maximize the speed of download for the images, consider using sprites: the east and west side images can be put inside the same bigger image: the only thing you modify is the background position:

    background-position: 32px 0px; /* this should move the background to the right */ 

    The advantage is you only need one picture, less connections are needed to download them for the client (faster) and it takes as much place.

    Hope this helps.

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

Sidebar

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The easiest way is to use Proc::Daemon. #!/usr/bin/perl use strict;… May 11, 2026 at 3:41 pm
  • added an answer The Base Class Library doesn't provide this type of control.… May 11, 2026 at 3:41 pm
  • added an answer Yeah, that's basically it. Before generics, one had to create… May 11, 2026 at 3:41 pm

Related Questions

I am currently developing a (somewhat large) site for a magazine, the site mainly
can anyone think of a good way to ignore the single click that comes
I have a binary field in my database that is hard to describe in
Reading about the G.729 codec , I found this interesting tidbit about Comfort Noise

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.