+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 13

Thread: Transparent backgrounds

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    12

    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?


  2. #2
    Design Guru tommylogic's Avatar
    Join Date
    Apr 2007
    Location
    Virtually Everywhere
    Posts
    6,352
    background: none;

  3. #3
    Junior Member
    Join Date
    May 2008
    Posts
    12
    What about translucent?

  4. #4
    Design Guru tommylogic's Avatar
    Join Date
    Apr 2007
    Location
    Virtually Everywhere
    Posts
    6,352
    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;
    }

  5. #5
    Web Developer
    Join Date
    Jul 2008
    Location
    United States
    Posts
    29
    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.

  6. #6
    Idiosyncratic Member ;) likethegoddess's Avatar
    Join Date
    May 2008
    Location
    San Francisco, Calif.
    Posts
    802
    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
    likethegoddess design for the arts
    Portfolio | Twitter | FriendFeed

  7. #7
    Design Guru tommylogic's Avatar
    Join Date
    Apr 2007
    Location
    Virtually Everywhere
    Posts
    6,352
    ^^ she meant ^^
    HTML Code:
    <!--[if lte IE 6]>
    <style>
    #comments {background-image: none}
    #contact {height: 85px; background-image: none;}
    </style>
    <![endif]-->

  8. #8
    Junior Member
    Join Date
    May 2008
    Posts
    12
    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 12:52 AM.

  9. #9
    Design Guru tommylogic's Avatar
    Join Date
    Apr 2007
    Location
    Virtually Everywhere
    Posts
    6,352
    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.

  10. #10
    Junior Member
    Join Date
    May 2008
    Posts
    12
    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.

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Similar Threads

  1. Transparent PNG
    By fermanaziz in forum Graphic Design and Web Design Help
    Replies: 1
    Last Post: 15-05-2008, 02:04 PM
  2. Free Vector Grunge Backgrounds
    By Graphic Design Links in forum Graphic Design Links
    Replies: 0
    Last Post: 22-04-2008, 12:20 PM
  3. Replace Backgrounds From Studio Portraits
    By Graphic Design Links in forum Graphic Design Links
    Replies: 0
    Last Post: 01-04-2008, 06:40 PM
  4. using transparant backgrounds...
    By lowen.f in forum CSS Forum
    Replies: 12
    Last Post: 06-01-2008, 08:46 PM
  5. Transparent gifs
    By Joe.Morgan in forum Graphic Design Forum
    Replies: 1
    Last Post: 09-05-2007, 03:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


The Graphics Forum Web Design Stuff Free Decent Downloads Free Quality Wallpapers Graphics Forum Free Vista Themes
The Top The Best Images Tech Talk 247 Logo Design - $149 Affordable Stock Vector Illustrations Creativecurio - Design Blog Graphic Design Advertising

Check the forum often for the latest design announcements. Everything from graphic design and web design, to films and music. Estetica is a great place for people to get together and help each other out.



Web Hosting - UK Web Hosting services for business or personal website hosting needs.

Dedicated Servers - A full range of Managed Dedicated Server solutions suitable for all your requirements.

Graphic Design Blog | Web Design Forum | Graphic Design and Print Forum | Graphic Design Links | Advertise On This Site

Web Design UK | Vision.To Design | Leaflet Printing | Estetica Design Forum's Privacy Policy

Flyer Printing | Photography Blog | Design Forum Links | Logo Design | Graphic Design Social Network | Logo Design

Graphic Design Tutorials | Logo Designer | UK Logo Design Studio | Land for sale | Vector Art Blog | Leaflet Printing

Free Web Hosting | Custom Logo Design - $149 Only | Affordable Print Design Templates | Small Business Logo Design | Company Logo Design

Logo Design Service | Logo Design Firm | Logo Design Reseller | Custom Logo Design | Letterhead Printing | Flyer Printing | Business Card Printing

Printing | Leaflet Printing | Online Backup | T-Shirt Printing | Personalised Mugs | Canvas Printing | Free Web Hosting Comparison Site