954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Fading out hr?

How can I get an hr to fade off into the page color on both ends?

Not an effect. Just the look of the

Thanks if someone can help :)

Joshua Kidd
Junior Poster
108 posts since Feb 2011
Reputation Points: 10
Solved Threads: 1
 

By controlling its width?

lps
Junior Poster
117 posts since Jul 2011
Reputation Points: 13
Solved Threads: 22
 

By replacing it with an image?

Dandello
Posting Whiz in Training
263 posts since May 2010
Reputation Points: 28
Solved Threads: 23
 

no, you can either use it in html code such as

<hr style="width:500px;"/>

or you can add class to the line and use CSS to control it.
Before I forget, you can center it by adding margin:auto

lps
Junior Poster
117 posts since Jul 2011
Reputation Points: 13
Solved Threads: 22
 

Since the request was for a fade - that would imply a gradient from the color of the hr element to the background color, which is why I suggested an image. Maybe a gradient would work. But I doubt it will work in MSIE.

Dandello
Posting Whiz in Training
263 posts since May 2010
Reputation Points: 28
Solved Threads: 23
 

Oh, maybe I misunderstand you meaning. How about if adding shadow to both side of the hr? It work for me, but the problem still in IE7/8 where I use filter to generate the shadow.

lps
Junior Poster
117 posts since Jul 2011
Reputation Points: 13
Solved Threads: 22
 

Nothing fancy or cool works properly in IE7/8. But apparently it does support gradients in CSS. Look for "CSS gradient background".
Let us know if it works.

Dandello
Posting Whiz in Training
263 posts since May 2010
Reputation Points: 28
Solved Threads: 23
 

WORKED!! Had to make a table with only certain sides gradient because I needed a horizontal hr as well but could not find one.

Joshua Kidd
Junior Poster
108 posts since Feb 2011
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You