Graphic Design Forum and Web Design Forum  

Go Back   Graphic Design Forum and Web Design Forum »General »Graphic Design and Web Design Help

Notices

Graphic Design and Web Design Help Get Graphic Design and Web Design related help here


Reply
 
LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 25-07-2008, 04:12 PM
Junior Member
 
Join Date: May 2008
Posts: 12
Default Transparent backgrounds

Cygnus here,

So, I'm finally getting to the point where I'm getting a loose handle on CSS. My website still in its rough stages, but it's starting to take shape. I'm experimenting with things more than anything. Trial and error, for me at least, is the best way to learn.

Anyway, can someone here teach me how to make a column transparent?
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote

  #2 (permalink)  
Old 25-07-2008, 04:20 PM
tommylogic's Avatar
f*ck yeah it validates!!!
 
Join Date: Apr 2007
Location: Virtually Everywhere
Gender: Male
Posts: 6,314
Default

background: none;
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #3 (permalink)  
Old 25-07-2008, 04:51 PM
Junior Member
 
Join Date: May 2008
Posts: 12
Default

What about translucent?
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #4 (permalink)  
Old 25-07-2008, 04:58 PM
tommylogic's Avatar
f*ck yeah it validates!!!
 
Join Date: Apr 2007
Location: Virtually Everywhere
Gender: Male
Posts: 6,314
Default

transparency isn't supported in CSS 2.1 it will be hopefully in CSS 3

the workaround involves using an alpha transparent PNG overlay and an IE Fix (because IE won't display it properly). The fix can be a CSS conditional comment and/or a JS such as jQuery png fix

on my page (top right image), I use a PNG-32 with alpha transparency & overlay it on the image's div via a class selector
Code:
.headermask {
    width: 602px;
    display: block;
    background: url(../images/header-mask.png) no-repeat left center;
    height: 125px;
    position: absolute;
    top: 0;
    right: -1px;
}
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #5 (permalink)  
Old 25-07-2008, 08:57 PM
Web Developer
 
Join Date: Jul 2008
Location: United States
Gender: Male
Posts: 29
Default

Great advice Tommy. :)

PNG is the current "and best" way to get transparency at small file sizes. GIF use to be used to get a similar effect, but does have issues with being of a larger size.

If you are wanting the image to stretch to fix the contents of your DIV, you will need to make the image background repeat along the Y-Axis. This will allow you to make an image, usually 10px or so high, move down the page as the DIV grows.
__________________
Rexibit Web Services - Website Design - Graphic Design Gallery
Don't just build it - CSS it.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #6 (permalink)  
Old 26-07-2008, 01:09 AM
likethegoddess's Avatar
Idiosyncratic Member ;)
 
Join Date: May 2008
Location: San Francisco, Calif.
Gender: Female
Posts: 339
Default

Yep, png is the way to go. CSS3 supports specing transparent backgrounds within your style sheet, but CSS3 isn't universally supported at this point.

Just remember that transparent pngs aren't supported by IE 6 and earlier. You'll need some code your head tags to work around it like the following. Unfortunately, the submission process clears out the code when I try to post an example. I've used a workaround at my site, Graphic and Web Design Services - like the goddess. Look for "if lte IE 6" statement.

Hope this helps.

Diana
__________________
Print, Web & Email Design for Creatives and Non-Profits
likethegoddess.com | On Twitter | On Facebook
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #7 (permalink)  
Old 26-07-2008, 01:21 AM
tommylogic's Avatar
f*ck yeah it validates!!!
 
Join Date: Apr 2007
Location: Virtually Everywhere
Gender: Male
Posts: 6,314
Default

^^ she meant ^^
HTML Code:
<!--[if lte IE 6]>
<style>
#comments {background-image: none}
#contact {height: 85px; background-image: none;}
</style>
<![endif]-->
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #8 (permalink)  
Old 28-07-2008, 01:45 AM
Junior Member
 
Join Date: May 2008
Posts: 12
Default

Help! Please help me! :(

I feel like a total idiot, but I can't help it anymore. I'm either not reading into this enough, or too much. Either way, I can't take it anymore and I need help!

My syntax sucks.

I'm trying to add just a simple background for my site, and I can't do it. I want it to cover the whole background which it does wonderfully. However, no matter what I do, or how many times I try to get it right, it won't work.

What is wrong with my syntax?




!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
head>
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
title>earthdrift

body {
background-color: #FFFFFF
background-image: url (image.jpg);
}

/head>
body>

edit: I had to leave out the first tag of each line because it wasn't being read correctly.

Last edited by cygnus; 28-07-2008 at 01:52 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #9 (permalink)  
Old 28-07-2008, 01:49 AM
tommylogic's Avatar
f*ck yeah it validates!!!
 
Join Date: Apr 2007
Location: Virtually Everywhere
Gender: Male
Posts: 6,314
Default

Quote:
Originally Posted by cygnus View Post
I want it to cover the whole background which it does wonderfully. However... it won't work.
I'm confused.. it works wonderfully, but it doesn't??? Which is it? If you have a link to the actual site, I might be able to help, but i can't tell from the limited code you posted.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #10 (permalink)  
Old 28-07-2008, 03:27 AM
Junior Member
 
Join Date: May 2008
Posts: 12
Default

Yeah, I kinda thought I didn't phrase that very well. Let me rephrase.

I've been fooling around with it, trying to get my background to work. It works in straight HTML, but not CSS. Everytime I try to work it out in CSS, it goes fubar, and the image can't be seen.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
Reply


Thread Tools
Display Modes

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparent PNG fermanaziz Graphic Design and Web Design Help 1 15-05-2008 03:04 PM
Free Vector Grunge Backgrounds Graphic Design Links Graphic Design Links 0 22-04-2008 01:20 PM
Replace Backgrounds From Studio Portraits Graphic Design Links Graphic Design Links 0 01-04-2008 07:40 PM
using transparant backgrounds... lowen.f CSS Forum 12 06-01-2008 08:46 PM
Transparent gifs Joe.Morgan Graphic Design Forum 1 09-05-2007 04:54 PM


All times are GMT. The time now is 06:06 PM.