/    Sign up×
Community /Pin to ProfileBookmark

Can you create a left/right image border for container in css?

I have two images — in which I am attempting to use as a left and right border for the main container. Is there a simple way to approach this in css?

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@KDLAMar 25.2008 — Nest one div (right edge) in another (left edge).
Copy linkTweet thisAlerts:
@PrimalMar 25.2008 — You could place one image on the right in one div, then place the other image on the left in a div inside.

[CODE]<div id="rightimage">
<div id="leftimage">
</div>
</div>[/CODE]


[B]Looks like KDLA beat me to the punch. ?[/B]
Copy linkTweet thisAlerts:
@WebJoelMar 25.2008 — CSS3 is coming to the rescue (-in about 10 years, maybe!), with:

[LIST]
  • [*][B]border-image[/B]:[LIST]
  • [*]border-top-image

  • [*]border-right-image

  • [*]border-bottom-image

  • [*]border-left-image
  • [/LIST]


    [I]and for images-in-corners, we have:[/I]
    [/LIST] [LIST]
  • [*][B]border-corner-image[/B]:[LIST]
  • [*]border-top-left-image

  • [*]border-top-right-image

  • [*]border-bottom-left-image

  • [*]border-bottom-right-image
  • [/LIST]
    [/LIST] Mostly, we're waiting for IE to adopt CSS2! ?
    Copy linkTweet thisAlerts:
    @CentauriMar 25.2008 — If the container width is fixed, and the images are repeatable vertically, then [B]one[/B] horizontal image slice repeated vertically can be applied as a background to the container.
    Copy linkTweet thisAlerts:
    @ne_plus_ultraauthorMar 26.2008 — You could place one image on the right in one div, then place the other image on the left in a div inside.

    [CODE]<div id="rightimage">
    <div id="leftimage">
    </div>
    </div>[/CODE]


    [B]Looks like KDLA beat me to the punch. ?[/B][/QUOTE]


    Thanks for your help - that makes sense. But when it comes to styling the css would I just use left/right margins?
    ×

    Success!

    Help @ne_plus_ultra spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.9,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...