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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:35:16+00:00 2026-06-05T17:35:16+00:00

I got 3 divs that: need to to be side by side ( in

  • 0

I got 3 divs that:

  • need to to be side by side ( in a row)
  • all have a background imgage
  • the center div need to adjust the width automatic, center div’s width dependance on the content that have been inserted into the div( longer text = longer width
  • center div needs to be at the center of the page too.
  • the divs on sides have diffrent backgrounds img.

HTML Code:

<div class="spanl"></div>
<div class="center">Headline</div>
<div class="spanr"></div>

note that the divs in sides are empty.

something like this:
http://jsfiddle.net/fsnuh/134/

Is this possible to do with css or css3? If not how can I do it with jquery or raw javascript?

  • 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-06-05T17:35:17+00:00Added an answer on June 5, 2026 at 5:35 pm

    Tables for the win! fiddle

    <!DOCTYPE html>
    <html>
        <head>
            <style type="text/css">
                #container {  display: table; width: 100% }
                #left, #right { display: table-cell; width: 50%; background: #ffd }
                #content { display: table-cell }
            </style>
        </head>
        <body>
            <div id="container">
                <div id="left"></div>
                <div id="content">
                    <div style="white-space: nowrap" onclick="this.firstChild.nodeValue += ' blah'">blah</div>
                </div>
                <div id="right"></div>
            </div>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine that we have some divs like that <div class=row chapter node=1>Chapter 1</div> <div
All, I've got the following code to open some divs that are acting as
I've got 3 divs lined up; the center div has many position:absolute images (which
I have a sprite image that is the background of a div and the
CSS & html id0 is the class for the div that's got background as
I have got lots of div.articles and in that articles; i've got list of
I got a series of divs like this: <div class=message style=padding-left: 0px;>...</div> <div class=message
I've got a div with a huge amount of child divs (around 4k-5k!). Each
I got two divs, one is a background and the other is the container
I have a div which has 14 child divs with some content. Now what

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.