HighDots Forums  

Gradients and round corners

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Gradients and round corners in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kerberos
 
Posts: n/a

Default Gradients and round corners - 12-02-2004 , 11:02 AM






I haven't found in my CSS book how to create a gradient to fill a division
tag, and to create a border with round corners.
Is it possible using either CSS or JavaScript?
I'd like to create a menu bar with a gradient in the background, and I
want the top corners to be a little round with a 5px radius.
Thanks,

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.osresources.com
http://exodus.jabberstudio.org

Reply With Quote
  #2  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: Gradients and round corners - 12-02-2004 , 11:08 AM






Kerberos wrote:
Quote:
I haven't found in my CSS book how to create a gradient to fill a
division tag, and to create a border with round corners.
Is it possible using either CSS or JavaScript?
I'd like to create a menu bar with a gradient in the background, and I
Create a gradient image as large as you want, and set the background
colour to match the bottom colour of the gradient so that it still looks
good on scaling.

Quote:
want the top corners to be a little round with a 5px radius.
See A List Apart for various round corner solutions. Alternatively, use
the CSS3 border-radius property in combination with -moz-border-radius
so that you get the effect in recent Gecko browsers and mythical future
CSS3-supporting browsers.

Both the gradient and the round corners can be seen on my site, although
you'll need to use one of the above browsers.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #3  
Old   
Kerberos
 
Posts: n/a

Default Re: Gradients and round corners - 12-02-2004 , 11:50 AM



Em Thu, 02 Dec 2004 16:08:33 +0000, Mark Tranchant
<mark (AT) tranchant (DOT) plus.com> escreveu:

Quote:
Kerberos wrote:
I haven't found in my CSS book how to create a gradient to fill a
division tag, and to create a border with round corners.
Is it possible using either CSS or JavaScript?
I'd like to create a menu bar with a gradient in the background, and I

Create a gradient image as large as you want, and set the background
colour to match the bottom colour of the gradient so that it still looks
good on scaling.
This is what I've done so far, with a 1px-wide gradient image, but that
would have been nice to find out a "hidden" CSS feature such as:

#navbar {
background-gradient: linear 90;
background-gradient-colors: #4900A4;
background-gradient-end: #3200A4;
}



Quote:
want the top corners to be a little round with a 5px radius.

See A List Apart for various round corner solutions. Alternatively, use
the CSS3 border-radius property in combination with -moz-border-radius
so that you get the effect in recent Gecko browsers and mythical future
CSS3-supporting browsers.

Both the gradient and the round corners can be seen on my site, although
you'll need to use one of the above browsers.
Indeed, it looks nice on Gecko browsers. I use Opera... I'll have to wait.



--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.osresources.com
http://exodus.jabberstudio.org


Reply With Quote
  #4  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: Gradients and round corners - 12-03-2004 , 03:34 AM



Kerberos wrote:
Quote:
Em Thu, 02 Dec 2004 16:08:33 +0000, Mark Tranchant
mark (AT) tranchant (DOT) plus.com> escreveu:

Create a gradient image as large as you want, and set the background
colour to match the bottom colour of the gradient so that it still
looks good on scaling.

This is what I've done so far, with a 1px-wide gradient image, but that
You might want to use a wider image, especially if your gradient will be
used on Netscape 4 which is notoriously slow at tiling background
images. Decent file formats (e.g. PNG) won't take much (any?) more space
for an 8px wide image than a 1px wide image, if each pixel row is a
solid colour.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.