Results 1 to 3 of 3

Thread: Scalable round CSS buttons

  1. #1
    Join Date
    Mar 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Scalable round CSS buttons

    Hi all!

    I'm relatively new to CSS and not sure if it's the difference in the browsers
    or my inexperience but what i'm trying to do is to make some buttons which
    have rounded edges and are scalable and can be placed anywhere in text.

    Here is what I've done so far which works great in firefox but not in IE6.
    http://bangalore.ooblez.com/index.html

    I place the image under the text using absolute positioning and z-indexing
    but either IE6 doesn't get the scaling right or i forgot something. Below is
    the css for the button image. As far as i know the image should scale
    relative to it's containing box (the "<a href.."). If i change the width and
    height to some fixed pixel value IE6 scales the pic accordingly but the use
    of fix values are what i'm trying to avoid at this point.

    .cssButton img {
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    }

    Any suggestion? I'm open to other ideas about scalable buttons. I could
    do it using plain colored background but rounded images are more fun.
    Try increasing the fontsize in FF (Ctrl++) and see how the buttons scale.

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Non-vector images like gifs can look funky when you let the browser re-size them.
    Have you thought about using css to fill the background of the spans, using css to round the corners?

  3. #3
    Join Date
    Aug 2007
    Location
    Portland, Maine
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

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
  •