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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:17:41+00:00 2026-06-03T04:17:41+00:00

I want to achieve the effect described in the following question, but using CSS.

  • 0

I want to achieve the effect described in the following question, but using CSS.
I remember seeing somewhere that this now can be done with HTML5, but now can’t find the property name.

Stretching an UIImage while preserving the corners

  • 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-03T04:17:43+00:00Added an answer on June 3, 2026 at 4:17 am

    You’ll have to use 3 different images.

    First, go into photoshop or Gimp or something and break the arrow image you have into 3 parts. The left side with the curve, and the right side with the arrow part. Save them as 3 different images.

    Once you’ve got your images. Create one HTML image element:

    <img src="img-middle.jpg" />
    

    In your CSS, apply styling to the before and after pseudo-elements and add the two image bits that you don’t want stretched.

    img:before {
        contents: '';
        background: url('img-left.jpg');
        height: 50px;
        width: 20px;
        position: absolute;
        left: -20px;
    }
    
    img:after {
        content: '';
        background: url('img-right.jpg');
        height: 50px;
        width: 40px;
        position: absolute;
        right: -40px;
    }
    

    Make sure you change the width, height, left and right values to match the width and height of your two image files. This CSS allows these bits of the image to be added on to the left and right sides, no matter how wide the element is stretched. It’s also cool since it’s only one element, so the CSS stays pretty clean except for the requirement of the empty content:”; property.

    So then you can stretch your middle image element dynamically. Lets say you want he arrow to stretch, have some jQuery that animates the width of the element, then the middle part will stretch and the corners will stay intact since they’re technically not part of the original element, they’re just appended.

    ETA: As for the method described in the objective-C related post, there’s no CSS property that breaks apart images like that unless it’s in some obscure webkit nightly build that I’ve never heard of. Your option here is to break apart the other two sides. You could also combine the left and right portions of your image into a sprite and use the background-position:; CSS property to select bits of the image so that way you’d only have two image file requests, as you want to keep those low to speed up page load time.

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

Sidebar

Related Questions

I want to achieve the effect of following query in Hibernate, but I'm unable
I want to achieve this effect - that when the parent div is toggled/slides
I want to achieve the effect of a 2D image I have but a
I want to achieve the functionality that this editor has got with its preview
Hey everyone, I have achieved the effect described in the title using the following
I want to achieve a blur effect using QML. I found references about the
I want to achieve an effect on a certain div with scriptaculous that does
I'm wondering if it's possible to achieve this effect only with css. As you
I'm using the Coda Slider effect described here: http://jqueryfordesigners.com/coda-slider-effect/ . It works perfectly but
I want to achieve an effect that is similar to the header effect on

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.