Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 2277 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Gradient colours

Thread title: Gradient colours
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
06-12-2008, 05:31 PM
#1
matthewcl375 is offline matthewcl375
Status: I'm new around here
Join date: Jun 2008
Location:
Expertise:
Software:
 
Posts: 4
iTrader: 0 / 0%
 

matthewcl375 is on a distinguished road

  Old  Gradient colours

I would be very grateful if anyone could tell me how gradient colours are applied to objects on an HTML page. By objects i mean background, panels e.t.c.

Thanks.

06-12-2008, 05:37 PM
#2
-NEO- is offline -NEO-
-NEO-'s Avatar
Status: Member
Join date: Oct 2005
Location: The Netherlands
Expertise:
Software:
 
Posts: 174
iTrader: 2 / 100%
 

-NEO- is on a distinguished road

Send a message via MSN to -NEO-

  Old

crop a line from your design:
width:1px
height: the length of your gradient

save it

open your html editor

type this in your stylesheet:

body{
background: url(imagelocationhere.jpg) repeat-x;
}

very easy!

06-12-2008, 05:43 PM
#3
matthewcl375 is offline matthewcl375
Status: I'm new around here
Join date: Jun 2008
Location:
Expertise:
Software:
 
Posts: 4
iTrader: 0 / 0%
 

matthewcl375 is on a distinguished road

  Old

Thanks!

06-12-2008, 11:58 PM
#4
Ralph is offline Ralph
Ralph's Avatar
Status: I'm new around here
Join date: Jun 2008
Location: Connecticut, USA
Expertise:
Software:
 
Posts: 12
iTrader: 0 / 0%
 

Ralph is an unknown quantity at this point

Send a message via AIM to Ralph

  Old

Yeah, that would be the only way to do it. There's no way to do it (as of yet) in CSS or HTML.

06-14-2008, 07:02 PM
#5
Swerls is offline Swerls
Status: Junior Member
Join date: Jun 2008
Location:
Expertise:
Software:
 
Posts: 34
iTrader: 0 / 0%
 

Swerls is on a distinguished road

Send a message via AIM to Swerls Send a message via MSN to Swerls Send a message via Yahoo to Swerls Send a message via Skype™ to Swerls

  Old

yea, i am a graphic designer so i usually just make the gradient in photoshop, but its all good

06-16-2008, 04:41 PM
#6
LeetPCUser is offline LeetPCUser
LeetPCUser's Avatar
Status: Member
Join date: Aug 2006
Location: Wisconsin
Expertise:
Software:
 
Posts: 132
iTrader: 0 / 0%
 

LeetPCUser is on a distinguished road

Send a message via AIM to LeetPCUser Send a message via MSN to LeetPCUser Send a message via Yahoo to LeetPCUser

  Old

The best part about that is you save a lot of load time using a one pixel image. If you were to cut out an entire image and use it as a background it would slow down load time quite a bit.

06-17-2008, 07:24 PM
#7
Liam is offline Liam
Liam's Avatar
Status: Member
Join date: Dec 2007
Location: Liverpool, UK
Expertise:
Software:
 
Posts: 287
iTrader: 0 / 0%
 

Liam is on a distinguished road

Send a message via MSN to Liam

  Old

once we get CSS3 we can do it with CSS

06-17-2008, 07:28 PM
#8
Immersion is offline Immersion
Status: Senior Member
Join date: Dec 2005
Location:
Expertise:
Software:
 
Posts: 918
iTrader: 5 / 100%
 

Immersion is on a distinguished road

  Old

Originally Posted by Liam View Post
once we get CSS3 we can do it with CSS
Awww one day my friend, one day.

06-26-2008, 07:40 PM
#9
cookie is offline cookie
cookie's Avatar
Status: Junior Member
Join date: Jun 2008
Location:
Expertise:
Software:
 
Posts: 25
iTrader: 0 / 0%
 

cookie is on a distinguished road

  Old

Originally Posted by Liam View Post
once we get CSS3 we can do it with CSS
I've seen some of the stuff we could do with CSS3 but I've never heard about gradients. This is going to be amazing!!

06-27-2008, 12:02 PM
#10
aeryes is offline aeryes
aeryes's Avatar
Status: I'm new around here
Join date: Jun 2008
Location:
Expertise:
Software:
 
Posts: 9
iTrader: 0 / 0%
 

aeryes is on a distinguished road

Send a message via ICQ to aeryes Send a message via MSN to aeryes Send a message via Skype™ to aeryes

  Old

Originally Posted by -NEO- View Post
crop a line from your design:
width:1px
height: the length of your gradient

save it

open your html editor

type this in your stylesheet:

body{
background: url(imagelocationhere.jpg) repeat-x;
}

very easy!
There is another neat trick: if you want to have gradients fading out to background color of your page you can create a transparent png that fades from page background color to transparent, and then you can css:

body{
background-color:#FFF;
}
.element1{
background: #000 url(imagelocationhere.png) repeat-x;
}
.element2{
background: #F00 url(imagelocationhere.png) repeat-x;
}

Needs a PNG fix for IE6 though

Closed Thread  
Page 1 of 2 1 2 >


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed