473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Gradients and round corners

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
Jul 21 '05 #1
3 14429
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.
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/
Jul 21 '05 #2
Em Thu, 02 Dec 2004 16:08:33 +0000, Mark Tranchant
<ma**@tranchant.plus.com> escreveu:
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;
}

:)
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
Jul 21 '05 #3
Kerberos wrote:
Em Thu, 02 Dec 2004 16:08:33 +0000, Mark Tranchant
<ma**@tranchant.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/
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: reneeccwest | last post by:
Hello, how can I make the end angle to be round? <table border="1"> <tr> <td>test </td> </tr> </table> If I run that table, it is a ratnagluar. Is it possible to round the 4 ends?
5
by: reneeccwest | last post by:
is there any way I can make the 4 end of table with round corner without using any images? <table border=1> <tr><td>I wanna be a round table</td></tr> </table>
1
by: Marek Mänd | last post by:
When one uses CSS such like as -moz-border-radius:5px; border:1px solid black; background:red; round corner is built in Mozilla: |FFFF |wFFF
3
by: Kerberos | last post by:
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...
2
by: deepakp | last post by:
Hi, I'm trying to create a site index page. The page layout will consist of a header, left navigation and content display. The left navigation and content display should look like the image file...
18
by: Mike D | last post by:
I am looking for a way in vb.net to take a form with sharp corners and just round off the corners a bit so they arent so sharp. I have seen this done in other applications.
10
by: harish | last post by:
Hi everyone, How to make a round corner dorders using div? with images or without images. Pls help me! -- harish ------------------------------------------------------------------------...
2
by: Dan Sikorsky | last post by:
Where are some nice samples for these rounded corner mouseover popups you see on web pages that have double underlined words/phrases on them that cause the popup?
5
by: Sachin | last post by:
Hi All, I have seen many web sites where they have small round corners around the tables rather than the traditional square one without using images. Would like to know what css attributes or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.