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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:17:10+00:00 2026-06-18T01:17:10+00:00

This is the image I’m talking about. https://i.stack.imgur.com/WTkhd.jpg Right now it works as a

  • 0

This is the image I’m talking about.

https://i.stack.imgur.com/WTkhd.jpg

Right now it works as a background of my news content. The brown area is the title, yellow are is the content.

When I write a long text into the content area, the text go out of the div because the picture isn’t big enough.

I want to split the image into 3 pieces.

  1. Header
  2. Middle
  3. Footer

Header and footer will always be applied once. Middle has to repeat itself depending on how long the text is.

How can I achieve this in CSS?

PS: You may call the split images “header.png, middle.png. and footer.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-06-18T01:17:11+00:00Added an answer on June 18, 2026 at 1:17 am

    HTML

    <div id="parentDiv">
       <div id="header">
       </div>
       <div id="middle">
       </div>
       <div id="footer">
       </div>
    </div>
    

    Let’s say the Image has a width of 300px.

    CSS

    #header
    {
         width:300px;
         height:100px;
         background-image: url("header.png");
         background-repeat: no-repeat;
    }
    #middle
    {    width:300px;
         height:400px;
         background-image: url("middle.png");
         background-repeat: repeat-y;
         /*If the width will be bigger than the actual
           width of the image, then add:
           background-repeat: repeat-x;
         */
    }
    #footer
    {
        width:300px;
        height:100px;
        background-image: url("footer.png");
        background-repeat: no-repeat;
    }
    

    More about background-repeat.

    Note that the image will be repeated, which won’t look really good, I suggest that give the middle a fixed height, and use, overflow:auto; which will create a scrollbar when contents exceeds the size.

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

Sidebar

Related Questions

See this Image below http://i46.tinypic.com/2pt6jkn.jpg This is report in SSRS as shown when it
I need to slice this image in css to use as background http://i28.lulzimg.com/f0f166e559.png but
similar to this image.. http://lh4.ggpht.com/__J8fmwUsWAg/TQqoQujrXLI/AAAAAAAAeeQ/SkOez_EiQWQ/2843141057.jpg
How do you put this image http://1.androidauthority.com/wp-content/uploads/2011/10/ics-notifications.jpg ) into the notification bar?
i have this image in the background: http://yoursdproperty.com/templates/pjo_joomlaforall/images/bgr.png of this page: http://yoursdproperty.com/index.php?option=com_jumi&fileid=8&Itemid=34 how do
I have this image source: domain.com/wp-content/themes/directorypress/thumbs/CambridgeSlide_harvardsquare.jpg&w=695 I would like to try and remove &w=695
I am using this github image cropper: https://github.com/iosdeveloper/ImageCropper In this image cropper, in the
Suppose I have this image: <img src=images/01.jpg border=0 rel=shadow /> Then with jQuery, I
I want to get this image uploading script right, but for whatever reason it
This image gives a good picture about Virtual Address space. But it only says

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.