Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-25-2007, 05:51 PM   PM User | #1
Aceramic
Regular Coder

 
Join Date: Oct 2007
Posts: 148
Thanks: 4
Thanked 4 Times in 4 Posts
Aceramic is an unknown quantity at this point
To validate, or not to validate...

So, I can choose one of the following options, post your opinion on which one I should take:

Use fully validated CSS with a PNG with alpha opacity, that looks like crap in IE.

Use invalid CSS by tossing out the PNG's, and using

Code:
filter:alpha(opacity=70
opacity:0.7;
which works perfectly in both IE and FF, but doesn't validate.


I'm all for having fully valid code, but I'd like the page to look good in both IE and FF, and haven't had much luck with the PNG hacks so far. :/

Which one should I use? :)
Aceramic is offline   Reply With Quote
Old 10-25-2007, 05:54 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Stick the styles for IE in an a stylesheet of their own and put this in between your head tags
Code:
<!--[if lte IE 6]>
<link rel="stylesheet" href="iestyle.css" type="text/css">
<![endif]-->
Opacity is valid in CSS 3 so when you validate you should validate with the CSS 3 profile.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Users who have thanked _Aerospace_Eng_ for this post:
Aceramic (10-25-2007)
Old 10-25-2007, 06:30 PM   PM User | #3
Aceramic
Regular Coder

 
Join Date: Oct 2007
Posts: 148
Thanks: 4
Thanked 4 Times in 4 Posts
Aceramic is an unknown quantity at this point
lol... Apperently, the
Code:
filter:alpha(opacity=70);
part is unnecessary... o.0

It validates now (using CSS 3.0). Thanks.
Aceramic is offline   Reply With Quote
Old 10-25-2007, 06:44 PM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
IE6 doesn't support the opacity property so it is still necessary for IE6.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:41 AM.


Advertisement
Log in to turn off these ads.