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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:01:19+00:00 2026-05-21T05:01:19+00:00

I’m currently working on a heading in joomla with background formed from 5 parts

  • 0

I’m currently working on a heading in joomla with background formed from 5 parts of images. Should look like this (just an ASCII example)

{=<Text>=--------}

which is split into

  1. Left ({=<)
  2. Title (Background for the text)
  3. Title-Right (>=-)
  4. Middle (-)
  5. Right (-})

Hope you guys can visualize this. Now, Title and Middle need to be repeated x, but I want Title to size according to the text, supposedly background for the text’s div. I can’t seems to get the right combination of div and css to do it correctly. Right now I wrap div in div for each part until the text. After the text, they just goes to the next line. display: inline can’t help much also. Guess I’m not so good with CSS after all.

Thanks in advance.

NOTE: I can’t attach print screen as the images are copyrighted.

EDIT: the Middle part has to expand so that the Right part hits the end, basically occupying the whole width.


|<-----------------------------Full Width of DIV------------------------------->|
{=<Short Text>=------------------------------------------------------------------}
{=<Much Longer Text>=------------------------------------------------------------}
{=<Much Much Much Longer Text>=--------------------------------------------------}

Thanks to Bazzz, I’ve found a way to do it.

Since Middle when set to width: 100% will reach the right end, so the only way to pull back a little is by using a shorter wrapper. Then place the “Right” part after the wrapper.

HTML

<div id="Header">
    <div id="Wrapper">
        <span id="Left">&nbsp;</span>
        <h1 id="Title">Title text</h1>
        <span id="Title-Right">&nbsp;</span>
        <span id="Mid">&nbsp;</span>
    </div>
    <span id="Right">&nbsp;</span>
</div>

CSS

#Header span, #Header h1 {
    display: inline-block;
    white-space:nowrap;
    overflow: hidden;
    width: 570px;
}
#Wrapper span, #Header h1 {
    display: inline-block;
    white-space:nowrap;//Don't wrap into 2nd line
    overflow: hidden;//This help with the 100% width setting
    width: 550px;//Header width - "Right" width
}
#Left {
    width: 20px;
    background: blue;
}
#Title {
    background: yellow;
}
#Title-Right {
    width: 20px;
    background: grey;
#Mid {
    width: 100%; //Maximize this
    background: green;
}
#Right {
    width: 20px;
    background: red;
}
  • 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-21T05:01:20+00:00Added an answer on May 21, 2026 at 5:01 am

    Here is my attempt to create what you asked for, see if it matches your requirement:

    http://jsfiddle.net/47Aej/

    You obviously can replace the background: blue;, background:red; etc. with your images. also feel free to change the “Title text” to see that the yellow part will size according to the text (it is the same h1 in the end).

    HTML

    <div id="Header">
    <span id="Left">&nbsp;</span><h1 id="Title">Title text</h1><span id="Mid">&nbsp;</span><span id="Right">&nbsp;</span>
    </div>
    

    CSS

    #Header span, #Header h1 {
        display: inline-block;
    }
    #Left {
        width: 20px;
        background: blue;
    }
    #Title {
        background: yellow;
    }
    #Mid {
        width: 60px;
        background: green;
    }
    #Right {
        width: 20px;
        background: red;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported

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.