3 replies [Last post]
LisaJill
Offline
Regular
Last seen: 18 years 11 weeks ago
Joined: 2003-08-06
Posts: 43
Points: 0

hi all!

I uh, redid my site (6 more days til school, so i'll be too busy to redo it again!)... the site looks fine in opera/netscape/mozilla on pc

however, it looks different, i'm using some code (that doesn't validate, but works in ie, surprise!)

#log   {
   position:absolute;
   top:270px;
   left:30px;
   width:530px;
   height: 808px;
   overflow: auto;   
   filter: alpha(opacity=70, style=0);
   -moz-opacity: 70%;
   background-color: #cccc99;
   padding:2px;
   border:2px solid #333333;
         }

in ie, this makes that div (and another with similiar parameters) transparent but colored with whatever background color you used... it's easier to just look to see it Wink

in IE it looks great and works fantastically; in moz/opera it is just solid - i knew this before i started so i designed the site so it'd be ok either way; but i'd still like it to be that semi-transparent coloration in all browsers

can someone help me out or point me to a tutorial for this?

thanks!

www.distantearlymorning.com/

EDIT ADD:

I must be completely blind because I can't for the life of me figure out two parse errors in my css file, can someone spot something that I"m missng, please?

Line: 90 
Parse Error - : #cccc99; padding: 2px; border: 2px solid #333333; } .date 

Line: 132 
Parse Error - : #cccc99; } .sideheader 

part of whats getting mese is that the .date and .sideheader mentioned respectively are definitely on totally different lines - like 3 lines down.... I don't know why its parsing it as tho its on the same line, and I suspect thats why its hiccuping

thanks for any help you can provide=)

http://www.lisa-jill.com/morning.css

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 13 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

dunno where to post this, redid site and minor problem

Hi LisaJill,
-moz-opacity and filter are not part of the css standards so you get the errors because of them. Try commenting them out and then revalidate.

It's possible that the filter code above the -moz-opacity is shorting out the style definition. So in other words Mozilla or Netscape may not see the moz-opacity as it doesn't recognize the filter tag.

You could try putting the filter after -moz-opacity or redeclare the style like:

#log   { 
   position:absolute; 
   top:270px; 
   left:30px; 
   width:530px; 
   height: 808px; 
   overflow: auto;    
   background-color: #cccc99; 
   padding:2px; 
   border:2px solid #333333; 
   filter: alpha(opacity=70, style=0); 
         }  
#log   {  -moz-opacity: 70%;}

Hope that helps

LisaJill
Offline
Regular
Last seen: 18 years 11 weeks ago
Joined: 2003-08-06
Posts: 43
Points: 0

dunno where to post this, redid site and minor problem

Tony,

thank you for your help =) that fixed the weird validation errors I posted about in the second part of the post...

however, that tag doesn't seem to -do- anything, it's certainly not opaque in mozilla 1.4, this is what w3c has to say:

# Line: 85 Context : #log

Parse Error - opacity=70, style=0)
# Line: 87 Context : #log

Parse Error - -moz-opacity: 70%;
# Line: 87 Context : #log

Parse error - Unrecognized : ;}
# Line: 127 Context : #side

Parse Error - opacity=70, style=0)
# Line: 132 Context : #side

Parse Error - -moz-opacity: 70%;
# Line: 132 Context : #side

Parse error - Unrecognized : ;} 

any idea what i'm doing wrong here?

this is the code i used, as suggested

#log   {
   position:absolute;
   top:270px;
   left:30px;
   width:530px;
   height: 808px;
   overflow: auto;   
   background-color: #cccc99;
   padding:2px;
   border:2px solid #333333;
   filter: alpha(opacity=70, style=0);
         } 

#log   {  -moz-opacity: 70%;
	

same for #side....

thanks =)

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 13 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

dunno where to post this, redid site and minor problem

Hi LisaJill,
-moz-opacity and filter are not part of the CSS standard so you will not be able to validate your CSS while they are in it.