Solved

ASP.net VB.net simple panel with a gradient

Posted on 2012-04-10
4
853 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now