SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2004
    Location
    ireland
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    two background images? Possible?

    Hi Folks,
    I've designed an H1 page heading within a DIV with rounded ends. and HTML text inbetween. It should appear as a horizontally expanding and contracting capsule. I can make one end rounded with a CSS background image in the DIV or the H1 - but how can I do the other? No tables allowed here and it has to be done only in the stylesheet. I've tried a BG in the DIV and a BG in the H1 but they don't line-up, even when there's no padding or margins.

    Is it possible to somehow attach an image to one side of an element?
    Thanks
    John

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,475
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You should be able to line the images up ok although you may need to use a negative margin on the background position in some cases. It can be a bit fiddly sometimes.

    However there are loads of tutorials about that explain how to do it so its probably best to look through these and find one that suits.

    http://www.alistapart.com/articles/customcorners/
    http://css-discuss.incutio.com/?page=RoundedCorners
    http://www.sitepoint.com/article/rou...css-javascript

    Paul

  3. #3
    SitePoint Member
    Join Date
    Oct 2004
    Location
    ireland
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there,
    Thanks for the tips! I'll check those out,
    John


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •