CSS newbie

crocknycrockny Registered Users Posts: 170 Major grins
edited January 1, 2014 in SmugMug Customization
So - I managed to find code to make my slideshow background black (with help from SunGlo)... now I am trying to make it slightly transparent ... I found this code, the last number I believe is supposed to affect the transparency? ... but I seem to get either totally transparent or black no matter what I do with that number ...

{background-color: (0,0,0, .9)

Here's the site:

http://untamednewyork.smugmug.com/

I've gone back to #000000 because I can't figure out how to do the transparency ... I know nothing about CSS ...

Help!

Comments

  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited December 31, 2013
    Transparency number
    .1 .2 .3 ... .6 thru .9 light to dark
    1.0 is solid
    even .00001 works for very transparent like none showing at all. Some browsers like the old IE's required
    a background when sliding the mouse down a drop menu. Unless the mouse hit some text you'd lose the
    drop so the hidden bg solved that.
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • crocknycrockny Registered Users Posts: 170 Major grins
    edited December 31, 2013
    That's what I thought but I don't see any difference when I use .5 or .6 for example ... I just used .5 and it's totally transparent - this is the code I used background-color: (0,0,0, .5)
  • ChancyRatChancyRat Registered Users Posts: 2,141 Major grins
    edited December 31, 2013
    Don't know whether this is related or not but I have just been struggling over transparency of a background image, and of font weight, and I swear I don't see changes between 600 and 700 for font, or 8 and 9 in transparency. I tried several different ways and just shook my head, like, what does this mean.
  • beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited December 31, 2013
    crockny wrote: »
    I found this code, the last number I believe is supposed to affect the transparency? ... but I seem to get either totally transparent or black no matter what I do with that number ...

    {background-color: (0,0,0, .9)
    I think you need to tell it that it's rgba, like this:
    background-color: rgb(51, 51, 51)!important; /* Fallback for no rgba support */
    background-color: rgba(51, 51, 51, .5)!important
    
    Change the r, g, b & a values to suit. You might not need the "!important" declarations.

    See http://www.w3schools.com/cssref/css_colors_legal.asp
    Yippee ki-yay, footer-muckers!
  • crocknycrockny Registered Users Posts: 170 Major grins
    edited January 1, 2014
    Hurray! That worked - changed the 51's to 0's and got what I wanted - thanks a heap!
Sign In or Register to comment.