![]() |
#1 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: ,
Posts: 51
|
![]() More hack student coding incoming.
I need to create a gradient background using CSS without using background-image. Right now that's being handled with this: Code:
html{ background: #e8e8e8; /* fallback for non-support */ background: -webkit-gradient(linear, left bottom, left top, from(#e8e8e8), to(#8c8c8c)); /* Safari and Chrome */ background: -moz-linear-gradient(top, #8c8c8c, #e8e8e8); /* Firefox 3.6+ */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#8c8c8c', endColorstr='#e8e8e8'); /* IE8 */ } body, #header, #footer { width: 720px; } body { padding: 10px 10px 10px 10px; margin-left: auto; margin-right: auto; border-radius: 15px; -moz-border-radius: 15px; /* Firefox */ background-color: #ffffff; } Thanks in advance. |
||
![]() ![]() |
|
![]() |
#2 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: May 2005
Location: Nitra, Slovakia
Posts: 6,533
|
![]() a word of advice from an experienced user: don't
1 x n pngs are very cheap in size. it's not worth the trouble
__________________
![]() |
||
![]() ![]() |
|
![]() |
#3 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: ,
Posts: 51
|
![]() It was an assignment requirement, and CSS cleanliness was not. I would never make a serious website like that.
Well, it's been graded, and I didn't do as well as I'd hoped. In hindsight, I could have combined all the background images into one image file with a transparent background and used background-position. Thanks for taking the time to reply. |
||
![]() ![]() |
|
![]() |
#4 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Mar 2006
Location: ,
Posts: 4,613
|
![]() I just heard that the latest version of some browsers support CSS3, which includes gradients:
http://www.dynamicdrive.com/style/cs...ear_gradients/ I don't know a lot about CSS but it seems there wasn't any satisfactory solution before. But I don't know if IE supports CSS3--Chrome, Firefox, Opera and Safari reportedly do.
__________________
Life starts every day anew. Prospects not so good... |
||
![]() ![]() |
|
![]() |
#5 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Dec 2010
Location: ,
Posts: 202
|
![]() Quote:
IE9 ambiguously claims they offer "more support" for CSS3... pfffft!
__________________
I can ride my bike with no handlebars |
||
![]() ![]() |
|
![]() |
#6 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: ,
Posts: 51
|
![]() Support for CSS3 never seems to be total. I didn't use the official syntax for gradients because none of my browsers (Firefox 3.6.16, IE8, forgot which Chrome) actually supported it, although Firefox and Chrome did have their own syntax for gradients. The other CSS3 property I wound up using was border-radius, which Chrome supports the official syntax for but Firefox 3.6+ and IE8 don't.
Hence the "more support" nonsense. |
||
![]() ![]() |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a DOS 6.22 install CD | Doink | Tech Corner | 10 | 30-01-2014 05:06 PM |
Need Help Creating CD-ROM Rip | Expack2 | Tech Corner | 9 | 27-10-2010 07:40 AM |
Creating Your Own Brushes. | Sean | Art Tutorials | 9 | 07-10-2005 04:16 PM |
Creating Your Own Patterns | Sean | Art Tutorials | 0 | 03-10-2005 05:25 PM |
Thread Tools | |
Display Modes | |
|
|
||
  |