Solved

ASP.net VB.net simple panel with a gradient

Posted on 2012-04-10
4
863 Views
Last Modified: 2012-04-26
Hi

Does anyone know of a simple example of how to get a gradient effect on a panel in an ASP.net WebForm. Not C# please, just VB.net

Thanks
0
Comment
Question by:murbro
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 250 total points
ID: 37831273
take a look at gradient generators using css3:
http://gradients.glrzad.com/
0
 

Author Comment

by:murbro
ID: 37831466
Thanks. Where do I put the code?
background-image: linear-gradient(bottom, rgb(223,240,242) 21%, rgb(163,205,240) 61%, rgb(99,167,219) 81%);
background-image: -o-linear-gradient(bottom, rgb(223,240,242) 21%, rgb(163,205,240) 61%, rgb(99,167,219) 81%);
background-image: -moz-linear-gradient(bottom, rgb(223,240,242) 21%, rgb(163,205,240) 61%, rgb(99,167,219) 81%);
background-image: -webkit-linear-gradient(bottom, rgb(223,240,242) 21%, rgb(163,205,240) 61%, rgb(99,167,219) 81%);
background-image: -ms-linear-gradient(bottom, rgb(223,240,242) 21%, rgb(163,205,240) 61%, rgb(99,167,219) 81%);

background-image: -webkit-gradient(
      linear,
      left bottom,
      left top,
      color-stop(0.21, rgb(223,240,242)),
      color-stop(0.61, rgb(163,205,240)),
      color-stop(0.81, rgb(99,167,219))
);
0
 
LVL 7

Assisted Solution

by:vbigham
vbigham earned 250 total points
ID: 37834426
I prefer this one: http://www.colorzilla.com/gradient-editor/

You should put the resulting code in your css file (maybe Site.css) in a selector for the element that should use the gradient.

For example maybe you have a div element where you want a gradient background like this:
    <div class="MyGradientBackground" />

Open in new window


You might have a css style selector like this:
.MyGradientBackground 
{
    background: rgb(174,188,191); /* Old browsers */
    background: -moz-linear-gradient(top, rgba(174,188,191,1) 0%, rgba(110,119,116,1) 50%, rgba(10,14,10,1) 51%, rgba(10,8,9,1) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(174,188,191,1)), color-stop(50%,rgba(110,119,116,1)), color-stop(51%,rgba(10,14,10,1)), color-stop(100%,rgba(10,8,9,1))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, rgba(174,188,191,1) 0%,rgba(110,119,116,1) 50%,rgba(10,14,10,1) 51%,rgba(10,8,9,1) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, rgba(174,188,191,1) 0%,rgba(110,119,116,1) 50%,rgba(10,14,10,1) 51%,rgba(10,8,9,1) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, rgba(174,188,191,1) 0%,rgba(110,119,116,1) 50%,rgba(10,14,10,1) 51%,rgba(10,8,9,1) 100%); /* IE10+ */
    background: linear-gradient(top, rgba(174,188,191,1) 0%,rgba(110,119,116,1) 50%,rgba(10,14,10,1) 51%,rgba(10,8,9,1) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#aebcbf', endColorstr='#0a0809',GradientType=0 ); /* IE6-8 */
}

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 37899103
thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question