iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old January 10th, 2008, 11:00 AM   #1
New Member
 

Join Date: May 2006
Location: UK
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 lmc148 is on a distinguished road
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 January 10th, 2008, 01:35 PM   #2
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
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
Aso 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 January 12th, 2008, 07:08 AM   #3
New Member
 

Join Date: May 2006
Location: UK
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 lmc148 is on a distinguished road
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 January 14th, 2008, 01:14 AM   #4
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,629
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
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 January 15th, 2008, 03:36 PM   #5
New Member
 

Join Date: May 2006
Location: UK
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 lmc148 is on a distinguished road
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 January 16th, 2008, 01:22 AM   #6
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,629
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
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

Bookmarks


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

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
CSS background image not using body R8515198 HTML, XHTML and CSS 3 April 26th, 2008 01:51 PM
[SOLVED] Aplying back ground image/s to body Oak HTML, XHTML and CSS 3 January 6th, 2008 03:55 PM
a box "pop-up" with fading background effect pesho318i JavaScript 3 November 2nd, 2007 02:51 PM
Fading background image geyids HTML, XHTML and CSS 26 July 18th, 2007 08:35 AM
asp.net embedded image in body help peebman2000 .NET 1 May 31st, 2007 01:13 PM


Search Engine Optimization by vBSEO 3.2.0 RC8