Solved

ASP.net VB.net simple panel with a gradient

Posted on 2012-04-10
4
866 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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 …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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