
12-19-2011, 06:02 AM
|
|
Temporarily Suspended
|
|
Join Date: Nov 2011
Posts: 146
|
|
I use this CSS code to achieve an opacity of 25%:
Code:
background: rgba(127,127,127,0.25)
Whilst this code works fine, it does not validate as CSS 2.1 due to the opacity part -> 0.25.
I was wondering if someone knew a correct way of doing what my code does with CSS 2.1?
|

12-19-2011, 06:20 AM
|
|
Web Hosting Master
|
|
Join Date: May 2009
Location: Area 51
Posts: 1,115
|
|
I don't think there is a way to validate opacity with CSS (I could be wrong). Of course you could always use a transparent image to achieve this.
__________________
█ Zomex - We specialize in web hosting templates & setup services
█ Premium web hosting templates > WHMCS Themes <
█ Admin-based Settings Area | Multi-language support | Multi-display options | 1-6 Plans | Complete Solution
█ We also provide > WHMCS Configuration <- Integration & web hosting business setup
|

12-19-2011, 06:30 AM
|
|
Temporarily Suspended
|
|
Join Date: Nov 2011
Posts: 146
|
|
Yeah, transparent image my have to be the way to go to achieve validate code. Grrrrrrr
See, I'm a strong advocate for using web standards, but when standards don't keep up with the times it makes it hard to justify why its important to use them. We have a long way to go in computers.
Last edited by FinalFrontier; 12-19-2011 at 06:33 AM.
|

12-19-2011, 06:31 AM
|
|
Web Hosting Master
|
|
Join Date: May 2009
Location: Area 51
Posts: 1,115
|
|
Quote:
Originally Posted by FinalFrontier
Yeah, transparent image my have to be the way to go to achieve validate code. Grrrrrrr
|
Yeah, it's definitely annoying although in most cases I prefer to save a lot of time then attempt to validate these type of things. Overall I think validation is a good thing but sometimes it makes more sense to use better methods that may show as errors.
__________________
█ Zomex - We specialize in web hosting templates & setup services
█ Premium web hosting templates > WHMCS Themes <
█ Admin-based Settings Area | Multi-language support | Multi-display options | 1-6 Plans | Complete Solution
█ We also provide > WHMCS Configuration <- Integration & web hosting business setup
|

12-19-2011, 07:47 AM
|
|
Temporarily Suspended
|
|
Join Date: Nov 2011
Posts: 146
|
|
Quote:
Originally Posted by zomex
Overall I think validation is a good thing but sometimes it makes more sense to use better methods that may show as errors.
|
Indeed zomex. I've decided to stick with the method I am using. I have already made an exception for overflow-x, so I'm just going to make an exception for this opacity thing also. Transparent image is just ridiculas in 2011!
I don't know why it takes W3C a decade to make a web standard. You can make an operating system in that time.
|

12-19-2011, 01:22 PM
|
|
Junior Guru
|
|
Join Date: Oct 2009
Location: Florida
Posts: 176
|
|
Why are you validating against CSS2.1?
If you're going to be using CSS3 features, just select CSS3 in the options for the validator, it'll work just fine.
|

12-19-2011, 04:44 PM
|
|
WHT Addict
|
|
Join Date: Nov 2009
Posts: 119
|
|
hi
have you try his ?
Quote:
filter:alpha(opacity=40);
opacity: 0.4;
|
works on all Browsers
|

12-19-2011, 07:01 PM
|
|
Web Hosting Master
|
|
Join Date: Nov 2010
Posts: 615
|
|
Quote:
Originally Posted by FinalFrontier
Indeed zomex. I've decided to stick with the method I am using. I have already made an exception for overflow-x, so I'm just going to make an exception for this opacity thing also. Transparent image is just ridiculas in 2011!
I don't know why it takes W3C a decade to make a web standard. You can make an operating system in that time.
|
What has been stated for opacity, also counts for overflow-x: validate against CSS3. W3C has indeed kept up with the times, your rant makes no sense.
What's this doing in Programming by the way?
|

12-19-2011, 09:01 PM
|
|
Temporarily Suspended
|
|
Join Date: Nov 2011
Posts: 146
|
|
Jack, no I haven't tried that and I will try it later on tonight. Thanks for that.
InsDel. CSS 3 isn't a standard yet, CSS 2.1 is the latest standard, hence why I am using it.
8088, your a major noob. Who builds a website on something that isn't a standard? Take your ignorant whining else where.
Last edited by FinalFrontier; 12-19-2011 at 09:10 PM.
|

12-19-2011, 09:09 PM
|
|
Web Hosting Master
|
|
Join Date: Nov 2010
Posts: 615
|
|
Quote:
Originally Posted by FinalFrontier
Who builds on something that isn't a standard?
|
Mozilla, Microsoft, Google and Apple, to name a few. Oh, and you apparently.
You're welcome.
|

12-19-2011, 10:00 PM
|
|
Vroom
|
|
Join Date: Jul 2007
Location: Ashburn, VA
Posts: 1,249
|
|
Who cares about validity as long as it works? It's not like the validity police will hunt you down if you have one line of CSS which doesn't make it though...
__________________
Preetam Jinka
Isomerous - High performance web services for business and individuals.
Bitcable KVMs, cPanel hosting, Oracle expertise, and more.
|

12-20-2011, 04:09 PM
|
|
Junior Guru
|
|
Join Date: Oct 2009
Location: Florida
Posts: 176
|
|
Quote:
Originally Posted by FinalFrontier
InsDel. CSS 3 isn't a standard yet, CSS 2.1 is the latest standard, hence why I am using it.
|
Not wholly true. CSS 2.1 and CSS3 Color (including RGBA, HSLA, etc.) are both W3C Recommendations since 7 June.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|