|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Enthusiast
![]() Join Date: Apr 2003
Location: NE
Posts: 75
|
creating transparent background
Hi,
I'm trying to create a half transparent background effect similar to this website. As what I understand, what he does was setting the "content" class as transparent and tile it with a image. However when I'm trying to create a transparent image like this in photoshop and put it on my website, the background image didn't go through these tiles and become visible. Can anyone tell me if there's a specific way to create these transparent image titles or there's something wrong with my css? Thanks.
__________________
::www.xiaohai.net:: -- No Moose in China |
|
|
|
|
|
#2 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2003
Location: Youngstown, OH
Posts: 1,031
|
this is what I found in his choco.css file:
Code:
.blogposts {
float: left;
margin: 0 10px 0 0;
padding: 0 0 0 10px;
border-left: 1px solid #996;
width: 394px;
text-align: left;
font: 75%/175% lucida grande, verdana, arial, helvetica, sans-serif;
background: transparent url(/choco/trans.gif);
color: #656633;
}
.blogposts img {
margin: 0;
padding: 10px;
background: transparent url(/choco/ffctrans.gif);
color: #464215;
border: 1px solid #B6B484;
}
|
|
|
|
|
|
#3 |
|
Test cases complete. 0 fails.
![]() Join Date: Feb 2001
Location: Melbourne Australia
Posts: 6,568
|
Didja notice the translucent link on her site? Says exactly how she did it right there.
__________________
[mmj] My momentous journey~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Bit Depth Blog · Twitter · Contact me Spuds Jokes Bazaar VCS Inkscape Firefox phpBB |
|
|
|
|
|
#4 |
|
SitePoint Member
Join Date: Jul 2003
Location: Green Bay, WI
Posts: 14
|
Wow, that is a pretty inventive way to use a gif to simulate transparency. Can't wait until there is full support for png and standardized css in IE.
|
|
|
|
|
|
#5 |
|
Test cases complete. 0 fails.
![]() Join Date: Feb 2001
Location: Melbourne Australia
Posts: 6,568
|
Yep. They are using a pattern like this:
O_ _O However, it may look smoother on most monitors with a pattern like this: O_
__________________
[mmj] My momentous journey~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Bit Depth Blog · Twitter · Contact me Spuds Jokes Bazaar VCS Inkscape Firefox phpBB |
|
|
|
|
|
#6 |
|
SitePoint Enthusiast
![]() Join Date: Apr 2003
Location: NE
Posts: 75
|
oopsy...didn't realize that. Thanks, everyone
![]()
__________________
::www.xiaohai.net:: -- No Moose in China |
|
|
|
|
|
#8 |
|
SitePoint Zealot
![]() ![]() Join Date: Sep 2003
Location: NY
Posts: 141
|
Alpha (opacity) is now supported by both major browsers i.e. MSIE6.0 and Mozilla/Firefox.
For example the following CSS code added to an image will make it translucent by 50% is both browsers: Code:
-moz-opacity:0.5; filter: Alpha(opacity='50'); |
|
|
|
|
|
#9 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Nov 2003
Location: Southampton, UK
Posts: 345
|
I was just about to pop into this forum and ask advice about this subject, when I noticed the title of this thread on the front page. Quickest response ever at minus 1 day! Thanks all. (I went with the GIF trick in the end, if anyone's interested)
|
|
|
|
|
|
#10 | |
|
Starting to-digg-in *********
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2003
Location: Island of Puerto Rico @ the Caribbean
Posts: 874
|
Quote:
__________________
James: Ecodig - My Blog - My Gallery Validate your sites: CSS - HTML/XHTML Without faith you are lost. |
|
|
|
|
|
|
#11 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2003
Location: Youngstown, OH
Posts: 1,031
|
I think I could use this with a couple designs I already have, especially the one I am working on for a local sports update type thing.
|
|
|
|
|
|
#12 |
|
SitePoint Enthusiast
![]() Join Date: Oct 2003
Location: Switzerland
Posts: 44
|
What a pity! I wanted to do a similar thing for my website and didn't find the solution. Now I can use it for the next redesign. Thanks a lot!
|
|
|
|
|
|
#13 |
|
Also available in Large
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2002
Location: Walsall, UK
Posts: 1,943
|
I've seen the 2x2 px graphic method used before (possibly on an old Microsoft minisite a while back) and thought it was a nice quick fix. I then started using the CSS opacity properties on digidiet and several intranet projects (can't share the links unfortunately). The CSS option is much clearer although obviously has the standards issue on its back.
The only problem I've noticed with the 2x2 px graphics is it causes havoc on my TFT monitor at work! When I first saw the samples on wannabegirl, I thought they were animated. They looked like the snow effect you get on a TV. Saying that, the percentage of non-IE/non-Mozilla browsers which can't render the CSS option is probably less than the percentage of TFT/chunky monitors so its one of those decisions. |
|
|
|
|
|
#14 | |
|
SitePoint Member
Join Date: Mar 2004
Location: København ; Danmark
Posts: 1
|
-khtml-opacity
Quote:
Eventually, we'll get CSS3 |
|
|
|
|
|
|
#15 | |
|
SitePoint Enthusiast
![]() Join Date: Aug 2003
Location: Jacksonville, Florida USA
Posts: 82
|
Quote:
Thanks... I have done the gif trick too http://freecfm.com/t/tentonhead/index.cfm?lite=home right click (in a gecko) and "view background image", then save it, then change the color in Photoshop if you want. It's about 20x20 so it is easy to work with. |
|
|
|
|
|
|
#16 | |
|
SitePoint Zealot
![]() ![]() Join Date: Sep 2003
Location: NY
Posts: 141
|
Quote:
|
|
|
|
|
|
|
#17 |
|
SitePoint Enthusiast
![]() Join Date: Oct 2003
Location: Switzerland
Posts: 44
|
I tried out both methods: the one with 2 dots in 2x2px square and the other one with only one dot at the upper side. Both look fine, but the effect is rather different. First is much more intense (like a curtain) than the other who looks lighter. Perhaps usable for two "over-layers", with changing the dot to downside? Has anyone played a bit with that?
The css-methods of opacity are not usable as long as not all browsers do the same thing with it - thats my opinion... |
|
|
|
|
|
#18 | |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Nov 2003
Location: Southampton, UK
Posts: 345
|
Quote:
The optimum size for a background image should weigh this against increased file size. Personally I use around 100x100 images, as they add so little filesize. My checkerboard transparency gif is 100x100 to eliminate the slowdown, and still weighs in at under 1/2k. |
|
|
|
|
|
|
#19 |
|
SitePoint Member
Join Date: Mar 2004
Location: Murmansk, Arctic
Posts: 8
|
One could always 'fake' a transparency by using 2 images. I've done this on my site for it to be cross-browser viewable in IE5.0
http://arctic.ithium.net/ |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 21:10.







[mmj] My momentous journey



Linear Mode
