Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Default Problem creating a simple button

    I am trying to create a simple button with round corners and a round beveled edge. When I export it to a GIF there is a trace amount of white outlining the round corners where it should be transparent. I am using the button on a dark blue background.

    I tried to fix this by putting the button on a small rectangle the same colour that my web page is using. I set the fill colour and the line colour to the same blue. When I use this button it puts a thin border around this added box in a light colour or blue. Why does it do that? Is there a way to prevent it?

    Dan

  2. #2
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Problem creating a simple button

    Hi Dan,

    Welcome to Talkgraphics.

    The fringe you are seeing with your transparent gif files is due to antialiasing. To create the illusion of transparency and smooth round button, the pixels around the object you are exporting are blended with the colours of any background object. This prevent the jagged edges that would otherwise result from the pixels' rectangular shape.

    When you export to transparent gif select only the shapes of your button and not the blue rectangle. That way the blending pixels will match to your page's background and not the white drawing board beneath.
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  3. #3
    Join Date
    Aug 2008
    Location
    Small town - Texas, USA.
    Posts
    81

    Default Re: Problem creating a simple button

    Might also be your html code.

    <img src="yourimage.gif" border="0" />

    You can also use CSS to eliminate a border on all images.

    Goes in between the <head></head> tags.

    <style type="text/css">
    <!--
    img{border:none;}
    -->
    </style>

    This might need to be moved?

  4. #4
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: Problem creating a simple button

    Another cause of this might be that you're not using whole pixels. Ensure there's no decimal points in the size of your shape.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  5. #5
    Join Date
    Aug 2000
    Location
    Virginia
    Posts
    4,432

    Default Re: Problem creating a simple button

    And make sure your shape's x,y coordinates are also whole pixels before you export it.

 

 

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
  •