Opacity

Discussion in 'HTML' started by salonowiec, Feb 11, 2011.

  1. salonowiec

    salonowiec Guest

    Can you help me with following or show proper group; what's wrong with
    "opacity" in this:

    <img src="apa2.png"; style="height:480 width:640 opacity: 0.5" />

    Opacity in my FFox 3.5 doesn't work.

    Thank you...
    salonowiec, Feb 11, 2011
    #1
    1. Advertising

  2. salonowiec

    123Jim Guest

    "salonowiec" <> wrote in message
    news:ij36f8$1i6$...
    > Can you help me with following or show proper group; what's wrong with
    > "opacity" in this:
    >
    > <img src="apa2.png"; style="height:480 width:640 opacity: 0.5" />
    >
    > Opacity in my FFox 3.5 doesn't work.
    >


    "Transparency is one of those weird things that is treated completely
    differently in all browsers."

    please read this:
    http://css-tricks.com/css-transparency-settings-for-all-broswers
    123Jim, Feb 11, 2011
    #2
    1. Advertising

  3. Ben C wrote:

    >> <img src="apa2.png"; style="height:480 width:640 opacity: 0.5" />
    >>
    >> Opacity in my FFox 3.5 doesn't work.

    >
    > Try style="height:480px; width:640px; opacity: 0.5"


    And omit the ";" after "apa2.png".

    > Gotta get the syntax right.


    Gotta learn to use checkers like
    http://validator.w3.org/
    http://jigsaw.w3.org/css-validator/
    (Somewhat difficult for novices, since the checkers speak rather technical
    languages, but novices really don't get the syntax right without checkers,
    and experts _know_ they don't get it right without checkers.)

    ObHTML: the alt attribute is required in an <img> element, and most probably
    essential for a content image that is larger than my typical browser window.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Feb 11, 2011
    #3
  4. salonowiec

    salonowiec Guest

    Oh, I'm sorry it doesn' work as well; all variants of punctuation tested.
    But, there are sites where this effect is there, so FF is probably O.K., see
    e.g.

    http://www.w3schools.com/Css/css_image_transparency.asp Example 2



    U¿ytkownik "Ben C" <> napisa³ w wiadomo¶ci
    news:...
    > On 2011-02-11, salonowiec <> wrote:
    >> Can you help me with following or show proper group; what's wrong with
    >> "opacity" in this:
    >>
    >><img src="apa2.png"; style="height:480 width:640 opacity: 0.5" />
    >>
    >> Opacity in my FFox 3.5 doesn't work.

    >
    > Try style="height:480px; width:640px; opacity: 0.5"
    >
    > Gotta get the syntax right.
    salonowiec, Feb 11, 2011
    #4
  5. salonowiec

    salonowiec Guest

    Uzytkownik "Jukka K. Korpela" <> napisal w wiadomosci
    news:Ho95p.9961$...
    > Ben C wrote:
    >
    >>> <img src="apa2.png"; style="height:480 width:640 opacity: 0.5" />
    >>>
    >>> Opacity in my FFox 3.5 doesn't work.

    >>
    >> Try style="height:480px; width:640px; opacity: 0.5"

    >
    > And omit the ";" after "apa2.png".
    >
    >> Gotta get the syntax right.

    >
    > Gotta learn to use checkers like
    > http://validator.w3.org/
    > http://jigsaw.w3.org/css-validator/
    > (Somewhat difficult for novices, since the checkers speak rather technical
    > languages, but novices really don't get the syntax right without checkers,
    > and experts _know_ they don't get it right without checkers.)
    >
    > ObHTML: the alt attribute is required in an <img> element, and most
    > probably essential for a content image that is larger than my typical
    > browser window.
    >
    > --
    > Yucca, http://www.cs.tut.fi/~jkorpela/




    And this works:

    <img src="xxxxx" width="640" height="480" alt="xxxxx"
    style="opacity:0.1" />
    The secret is in quotes, semicolons?...
    salonowiec, Feb 11, 2011
    #5
  6. salonowiec wrote:

    > <img src="xxxxx" width="640" height="480" alt="xxxxx"
    > style="opacity:0.1" />
    > The secret is in quotes, semicolons?...


    Well, yes sort of, they all need to be in the correct places. But its
    apple and oranges in your efforts. Style property rules need to be
    separated by semicolons, but HTML attributes must not.

    This XHTML example shows correct syntax for scaling an image by the
    XHTML *attibutes* width and height:

    <img src="xxxxx" width="640" height="480" alt="xxxxx" style="opacity:
    0.1" />

    And this using the style *properties* width and height:

    <img src="xxxxx" alt="xxxxx" style="width: 640px; height: 480px;
    opacity: 0.1" />

    Yes you have use the correct syntax for it to work

    PS: Neither of the above examples are going to work in IE<=8

    PPS: w3schools.com has *no* affiliation with W3C, and some of the info
    on the site is inaccurate and sometimes just plain wrong.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Feb 11, 2011
    #6
  7. On Feb 11, 2:51 pm, "Jonathan N. Little" <> wrote:
    > PPS: w3schools.com has *no* affiliation with W3C, and some of the info
    > on the site is inaccurate and sometimes just plain wrong.

    This implies that some of the inaccurate information is correct???
    Captain Paralytic, Feb 11, 2011
    #7
  8. Captain Paralytic wrote:
    > On Feb 11, 2:51 pm, "Jonathan N. Little"<> wrote:
    >> PPS: w3schools.com has *no* affiliation with W3C, and some of the info
    >> on the site is inaccurate and sometimes just plain wrong.


    > This implies that some of the inaccurate information is correct???


    Just too abridged,

    ....some of the info on the site is inaccurate and sometimes it is just
    plain wrong

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Feb 11, 2011
    #8
  9. On Feb 11, 3:40 pm, "Jonathan N. Little" <> wrote:
    > Captain Paralytic wrote:
    > > On Feb 11, 2:51 pm, "Jonathan N. Little"<>  wrote:
    > >> PPS: w3schools.com has *no* affiliation with W3C, and some of the info
    > >> on the site is inaccurate and sometimes just plain wrong.

    > > This implies that some of the inaccurate information is correct???

    >
    > Just too abridged,
    >
    > ...some of the info on the site is inaccurate and sometimes it is just
    > plain wrong

    Still implies the same thing. It suggests that some of the information
    on the site is inaccurate, but may not be "plain wrong".
    Captain Paralytic, Feb 11, 2011
    #9
  10. salonowiec

    123Jim Guest

    "Captain Paralytic" <> wrote in message
    news:...
    On Feb 11, 3:40 pm, "Jonathan N. Little" <> wrote:
    > Captain Paralytic wrote:
    > > On Feb 11, 2:51 pm, "Jonathan N. Little"<> wrote:
    > >> PPS: w3schools.com has *no* affiliation with W3C, and some of the info
    > >> on the site is inaccurate and sometimes just plain wrong.

    > > This implies that some of the inaccurate information is correct???

    >
    > Just too abridged,
    >
    > ...some of the info on the site is inaccurate and sometimes it is just
    > plain wrong

    Still implies the same thing. It suggests that some of the information
    on the site is inaccurate, but may not be "plain wrong".

    Wish someone here would point out some examples from that site are wrong
    ...as I find it is concisely written. easy to search, a quick reference ..
    where are the glaring errors?
    123Jim, Feb 11, 2011
    #10
  11. 123Jim wrote:

    > Wish someone here would point out some examples from that site
    > [w3schools] are wrong ..as I find it is concisely written. easy to search,
    > a > quick reference .. where are the glaring errors?


    The problem is the simple and searchable presentation that you describe,
    combined with unreliability of content. Glaring errors are less harmful than
    less obvious errors. Glaring errors make the novice go away.

    The problems of w3schools content are discussed fairly often in relevant
    Usenet groups. Stick around...

    .... but as a simple example, about my pet peeve, the page
    http://www.w3schools.com/tags/tag_IMG.asp
    basically gets things right, _except_ for its example. And as you may know,
    if you give an excellent theoretical and practical presentation accompanied
    with a poor example, it is the example that people will understand and
    remembed.

    When would you say "Angry face" in conversation, or in writing? Wouldn't you
    rather say "I'm angry"? Or, more naturally, "You goofed it up again!" or
    "You bastards!".

    Yet the page gives the example
    <img src="angry.gif" alt="Angry face" />
    (pointlessly using XHTML syntax, but that's much less serious). They simple
    didn't give the issue of ALTernative text the slightest *thought*. They just
    wrote a stupid (and, as it happens, a wrong) _description_ of an image.

    And if you look at
    http://www.w3schools.com/Css/css_image_transparency.asp
    you'll see examples that contain _no_ alt attribute, even though another
    pages of theirs (correctly) indicates it as required.

    Examples are never "just examples". Examples are what people learn from.
    Texts are just casual explanations and annotations, mostly ignored.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Feb 11, 2011
    #11
  12. salonowiec

    dorayme Guest

    In article <ij3l8g$jj9$-september.org>,
    "Jonathan N. Little" <> wrote:

    > Captain Paralytic wrote:
    > > On Feb 11, 2:51 pm, "Jonathan N. Little"<> wrote:
    > >> PPS: w3schools.com has *no* affiliation with W3C, and some of the info
    > >> on the site is inaccurate and sometimes just plain wrong.

    >
    > > This implies that some of the inaccurate information is correct???

    >
    > Just too abridged,
    >
    > ...some of the info on the site is inaccurate and sometimes it is just
    > plain wrong


    You said it right in the first place, Jonathan. It was not too
    abridged. The distinction between being partly wrong and totally
    wrong is a perfectly useful and understandable notion.

    --
    dorayme
    dorayme, Feb 11, 2011
    #12
  13. dorayme wrote:
    > In article<ij3l8g$jj9$-september.org>,
    > "Jonathan N. Little"<> wrote:
    >
    >> Captain Paralytic wrote:
    >>> On Feb 11, 2:51 pm, "Jonathan N. Little"<> wrote:
    >>>> PPS: w3schools.com has *no* affiliation with W3C, and some of the info
    >>>> on the site is inaccurate and sometimes just plain wrong.

    >>
    >>> This implies that some of the inaccurate information is correct???

    >>
    >> Just too abridged,
    >>
    >> ...some of the info on the site is inaccurate and sometimes it is just
    >> plain wrong

    >
    > You said it right in the first place, Jonathan. It was not too
    > abridged. The distinction between being partly wrong and totally
    > wrong is a perfectly useful and understandable notion.
    >


    My proses may wax poetic?

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Feb 11, 2011
    #13
  14. salonowiec

    123Jim Guest

    "Jukka K. Korpela" <> wrote in message
    news:dMd5p.10085$...
    > 123Jim wrote:
    >
    >> Wish someone here would point out some examples from that site
    >> [w3schools] are wrong ..as I find it is concisely written. easy to
    >> search, a > quick reference .. where are the glaring errors?

    >
    > The problem is the simple and searchable presentation that you describe,
    > combined with unreliability of content. Glaring errors are less harmful
    > than less obvious errors. Glaring errors make the novice go away.
    >
    > The problems of w3schools content are discussed fairly often in relevant
    > Usenet groups. Stick around...
    >
    > ... but as a simple example, about my pet peeve, the page
    > http://www.w3schools.com/tags/tag_IMG.asp
    > basically gets things right, _except_ for its example. And as you may
    > know, if you give an excellent theoretical and practical presentation
    > accompanied with a poor example, it is the example that people will
    > understand and remembed.
    >
    > When would you say "Angry face" in conversation, or in writing? Wouldn't
    > you rather say "I'm angry"? Or, more naturally, "You goofed it up again!"
    > or "You bastards!".
    >
    > Yet the page gives the example
    > <img src="angry.gif" alt="Angry face" />
    > (pointlessly using XHTML syntax, but that's much less serious). They
    > simple didn't give the issue of ALTernative text the slightest *thought*.
    > They just wrote a stupid (and, as it happens, a wrong) _description_ of an
    > image.
    >
    > And if you look at
    > http://www.w3schools.com/Css/css_image_transparency.asp
    > you'll see examples that contain _no_ alt attribute, even though another
    > pages of theirs (correctly) indicates it as required.
    >
    > Examples are never "just examples". Examples are what people learn from.
    > Texts are just casual explanations and annotations, mostly ignored.
    >
    > --
    >


    Aha . I understand .. thanks .. I will look out for these errors in future
    ... Makes me wonder though why no-one gives them feedback on their errors
    123Jim, Feb 11, 2011
    #14
  15. salonowiec

    dorayme Guest

    In article <ij3rp1$doc$-september.org>,
    "Jonathan N. Little" <> wrote:

    > dorayme wrote:
    > > In article<ij3l8g$jj9$-september.org>,
    > > "Jonathan N. Little"<> wrote:
    > >

    ....
    > > You said it right in the first place, Jonathan. It was not too
    > > abridged. The distinction between being partly wrong and totally
    > > wrong is a perfectly useful and understandable notion.
    > >

    >
    > My proses may wax poetic?


    No, you are perfect in every way and it will all pay off when you
    get to The Gates of St Peter.

    --
    dorayme
    dorayme, Feb 11, 2011
    #15
  16. salonowiec

    dorayme Guest

    In article <ij3tqd$vmd$-september.org>,
    "123Jim" <> wrote:

    > > ... but as a simple example, about my pet peeve, the page
    > > http://www.w3schools.com/tags/tag_IMG.asp
    > > basically gets things right, _except_ for its example.


    Perhaps better:

    <img src="angry.gif" alt="Grrrr!" />

    --
    dorayme
    dorayme, Feb 11, 2011
    #16
  17. dorayme wrote:
    > No, you are perfect in every way and it will all pay off when you
    > get to The Gates of St Peter.


    I'm not in any rush.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Feb 11, 2011
    #17
  18. salonowiec

    dorayme Guest

    In article <ij4edd$ggd$-september.org>,
    "Jonathan N. Little" <> wrote:

    > dorayme wrote:
    > > No, you are perfect in every way and it will all pay off when you
    > > get to The Gates of St Peter.

    >
    > I'm not in any rush.


    Why love life so much? <g>

    --
    dorayme
    dorayme, Feb 11, 2011
    #18
  19. salonowiec

    Andy Guest

    "salonowiec" <> wrote in message
    news:ij36f8$1i6$...
    > Can you help me with following or show proper group; what's wrong with
    > "opacity" in this:
    >
    > <img src="apa2.png"; style="height:480 width:640 opacity: 0.5" />
    >
    > Opacity in my FFox 3.5 doesn't work.
    >
    > Thank you...
    >


    Hi,

    This is what I use on my site...

    Full visibility...

    <img src="pic.gif" style="filter:alpha(opacity=100); -moz-opacity:1.0;
    opacity:1.0; -khtml-opacity:1.0;">

    Half faded...

    <img src="pic.gif" style="filter:alpha(opacity=50); -moz-opacity:0.5;
    opacity:0.5; -khtml-opacity:0.5;">

    Vanished...

    <img src="pic.gif" style="filter:alpha(opacity=0); -moz-opacity:0.0;
    opacity:0.0; -khtml-opacity:0.0;">


    Hope this helps

    Andy
    Andy, Feb 12, 2011
    #19
  20. salonowiec

    salonowiec Guest

    U¿ytkownik "Andy" <> napisa³ w wiadomo¶ci
    news:8ps5p.5599$2...
    >
    >
    > "salonowiec" <> wrote in message
    > news:ij36f8$1i6$...
    >> Can you help me with following or show proper group; what's wrong with
    >> "opacity" in this:
    >>
    >> <img src="apa2.png"; style="height:480 width:640 opacity: 0.5" />
    >>
    >> Opacity in my FFox 3.5 doesn't work.
    >>
    >> Thank you...
    >>

    >
    > Hi,
    >
    > This is what I use on my site...
    >
    > Full visibility...
    >
    > <img src="pic.gif" style="filter:alpha(opacity=100); -moz-opacity:1.0;
    > opacity:1.0; -khtml-opacity:1.0;">
    >
    > Half faded...
    >
    > <img src="pic.gif" style="filter:alpha(opacity=50); -moz-opacity:0.5;
    > opacity:0.5; -khtml-opacity:0.5;">
    >
    > Vanished...
    >
    > <img src="pic.gif" style="filter:alpha(opacity=0); -moz-opacity:0.0;
    > opacity:0.0; -khtml-opacity:0.0;">
    >
    >
    > Hope this helps
    >
    > Andy


    Thank you, Andy, I hope I'm O.K. with "opacity" now. There is one more
    problem: opacity in FF has one parameter which is transparency (0 to 1). The
    IE is:
    filter: Alpha(Opacity=100, Style=3) so there is Style parameter which makes
    really nice effects. Have you any idea how it might be realized in IE?

    Thanks...
    salonowiec, Feb 12, 2011
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nebojsa Dinic

    JPanel transparency (opacity)

    Nebojsa Dinic, Apr 16, 2004, in forum: Java
    Replies:
    0
    Views:
    3,314
    Nebojsa Dinic
    Apr 16, 2004
  2. DU
    Replies:
    13
    Views:
    921
  3. Sentient Fluid

    Opacity

    Sentient Fluid, Apr 22, 2005, in forum: HTML
    Replies:
    0
    Views:
    563
    Sentient Fluid
    Apr 22, 2005
  4. windandwaves

    opacity

    windandwaves, Feb 18, 2006, in forum: HTML
    Replies:
    10
    Views:
    2,268
    Jim Higson
    Feb 26, 2006
  5. Jim Higson

    What is -khtml-opacity for?

    Jim Higson, Mar 4, 2006, in forum: HTML
    Replies:
    3
    Views:
    9,703
    Toby Inkster
    Mar 5, 2006
Loading...

Share This Page