Web Design and Development Forums

Fading the content div into the body background-image?

This is a discussion on "Fading the content div into the body background-image?" within the CSS Forum section. This forum, and the thread "Fading the content div into the body background-image? are both part of the Design Your Website category.


Go Back   Webforumz.com > Design Your Website > CSS Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Jan 10th, 2008, 15:00   #1 (permalink)
Junior Member
 
Join Date: May 2006
Location: UK
Posts: 31
Question Fading the content div into the body background-image?

Hi

I have my background, which is a photo of rich fabric:

body
{
background-image: url("fabric.jpg")
}

Then I have my content div:

div.content
{
background-color: #ffffeb;
border: 2px solid #660000;
padding: 3em;
margin-top: 20px;
margin-left: 20px;
margin-right: 20px;
margin-bottom:10px;
}


which just slaps a box over the top of the background; it looks very harsh. Is there a way of fading them in CSS or do you have to do some clever thing in Photoshop (which I'm not clever at! )?

Thanks
lmc148 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 10th, 2008, 17:35   #2 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 701
Blog Entries: 2
Send a message via Skype™ to aso186
Re: Fading the content div into the body background-image?

You can use CSS transparency filters if that's what you are after, but I'm not sure of the extent of their support in various (older) browsers.

Otherwise, you can make a very big, semi-transparent PNG that you use as the background image of your content. Then the body background will appear to 'show through'.

If using the second method, you'll need a script such as IE PNG Fix to fix transparent PNG's in IE6
__________________

aso186 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 12th, 2008, 11:08   #3 (permalink)
Junior Member
 
Join Date: May 2006
Location: UK
Posts: 31
Smile Re: Fading the content div into the body background-image?

Thanks. I've done it using CSS transparency. I've made the background transparent but then made the text/photos on top non-transparent. I must admit the non-transparent text does not look as crisp as normal though, this process changes it somehow.

(I don't understand the png option, so will stick to CSS).
lmc148 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 05:14   #4 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Fading the content div into the body background-image?

Could I see the "fabric.jpg" image?
You can easily do a transparency PNG image using Photoshop. Let me do it for you
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 15th, 2008, 19:36   #5 (permalink)
Junior Member
 
Join Date: May 2006
Location: UK
Posts: 31
Smile Re: Fading the content div into the body background-image?

Hi Monie

That's very kind of you, thanks for the offer. I've used CSS for the moment & at this stage I'm not sure the person concerned will even like it, so I'll wait & see first. Thanks.
lmc148 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 16th, 2008, 05:22   #6 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Fading the content div into the body background-image?

Ok then... Wish you good luck
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Aplying back ground image/s to body Oak HTML Forum 3 Jan 6th, 2008 19:55
a box "pop-up" with fading background effect pesho318i JavaScript Forum 3 Nov 2nd, 2007 17:51
Fading background image geyids HTML Forum 26 Jul 18th, 2007 12:35
asp.net embedded image in body help peebman2000 ASP.NET Forum 1 May 31st, 2007 17:13
A gap appears beween the Page Title and the Body Content of the page. sovereign6 HTML Forum 6 Dec 18th, 2006 19:14



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 08:36.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59