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

  • Home
  • SEARCH
  • 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 5944143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:29:45+00:00 2026-05-22T16:29:45+00:00

I want to position, in a page, a bar like this: [corner-l][variable][ornament][variable][corner-r] the variable

  • 0

I want to position, in a page, a bar like this:

[corner-l][variable][ornament][variable][corner-r]

the “variable” spacer parts should be resizable, but ultimately, the surrounding container (containing all of this) should dictate the maximum width, and the setup described above should stretch the two spacers equally (without having to state an explicit width for the spacers), leaving the “ornament” in the center.

All parts are of perfectly equal height of 260 px. All of these divs contain the image as a background-image. the “variable” part contains a 1px wide fiber of the bar (again, as a background-image, with repeat-x set).

Can I do this, and perhaps support the major browsers? What’s the best way to do it?

  • 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-22T16:29:46+00:00Added an answer on May 22, 2026 at 4:29 pm

    Can I do this, and perhaps support the
    major browsers?

    My answer will work in all modern/major browsers, with the exception of IE7. I’m not sure whether you’d consider that a major browser; it’s borderline nowadays.

    See: http://jsfiddle.net/PyTAD/ (and resize your browser to test the fluidity)

    CSS:

    .barContainer {
        border: 2px dashed #000;
        width: 100%;
        display: table;
        table-layout: fixed
    }
    .barContainer > div {
        outline: 1px dashed #00f;
        display: table-cell;
        height: 260px
    }
    .corner-l, .corner-r {
        width: 50px;
        background: #ccc
    }
    .variable {
        background: #999
    }
    .ornament {
        background: #f0f;
        width: 100px
    }
    

    HTML:

    <div class="barContainer">
        <div class="corner-l">1</div>
        <div class="variable">2</div>
        <div class="ornament">3</div>
        <div class="variable">4</div>
        <div class="corner-r">5</div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to put a bar on the bottom of my page containing a
I want to know the current page position of the ViewPager . I create
I wrote an alert bar like this: alertmsg{ font-family:Arial,Helvetica,sans-serif; font-size:135%; font-weight:bold; overflow: hidden; width:
I am writing in asp.net c# code. I want to control the page position
I'm trying to lay out a web page like this: |-----------------------| | header (fixed)
I want to position a div in the middle of the page. The solution
The master page currently looks like this: (No, I don't work for Google. The
I have a fixed-width web page (640 pixels wide). I would like this page
I want to postion a DIV inside a page such that it is visible
I want to position an element in normal css relative to the element before

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.