Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 25, 2010, 10:42 AM   #1
e7e
macrumors member
 
Join Date: Dec 2007
CSS3 validation?

After searching around the web for drop shadow, I found that the css3 has a nice and easy way to accomplish this by writing to lines of code.

Code:
	
-moz-box-shadow: 1px 1px 10px #999;
-webkit-box-shadow: 1px 1px 10px #999;
But the CSS validator wont validate those two lines, even after I chose CSS3 profile. Is there anything I am missing here?
__________________
15 inch Macbook Pro Retina 2.3 , 16 GB RAM;
Iphone 5;
Ipad 2
e7e is offline   0 Reply With Quote
Old Apr 25, 2010, 11:06 AM   #2
Renese-Williams
macrumors member
 
Join Date: Jan 2010
Quote:
Originally Posted by e7e View Post
After searching around the web for drop shadow, I found that the css3 has a nice and easy way to accomplish this by writing to lines of code.

Code:
	
-moz-box-shadow: 1px 1px 10px #999;
-webkit-box-shadow: 1px 1px 10px #999;
But the CSS validator wont validate those two lines, even after I chose CSS3 profile. Is there anything I am missing here?
It seems to me that those hyphens in front of the selectors are causing the problem. Usually when you have those it means the code is trying only to target specific browsers. For example: *moz-box-shadow: 1px; would be targeting IE I believe.

Those hacks don't play well with the validators. Try seeing if you can use the code without those hacks.
Renese-Williams is offline   0 Reply With Quote
Old Apr 25, 2010, 12:08 PM   #3
e7e
Thread Starter
macrumors member
 
Join Date: Dec 2007
I tried just using the code like this:

Code:
box-shadow: 1px 1px 10px #999;
But it wont work, so the only option left for me is to manually shadow the edges which I have no idea how to do
__________________
15 inch Macbook Pro Retina 2.3 , 16 GB RAM;
Iphone 5;
Ipad 2
e7e is offline   0 Reply With Quote
Old Apr 25, 2010, 12:28 PM   #4
SpeedofMac
macrumors newbie
 
Join Date: Jan 2010
Location: Canada
I think that 'box-shadow' without the '-webkit' or '-moz' prefix works in Opera 10.5 and later. Here's an A List Apart article on how to add shadows to sections of your webpage: http://www.alistapart.com/articles/cssdrop2/. They go through the process step by step, and if you do everything they suggest, you'll even get shadows in IE5.5 and IE6.
__________________
13" MacBook Pro, 2.53 GHz, 4 GB RAM, http://consoleemu.com
SpeedofMac is offline   0 Reply With Quote
Old Apr 25, 2010, 03:37 PM   #5
angelwatt
Demi-God (Moderator emeritus)
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: Ohio
The validator isn't an absolute law or anything. It just lets you know where there's non-standard or bad syntax code at. Using browser-specific CSS is fine even if the validator doesn't approve of it.
angelwatt is offline   0 Reply With Quote
Old Apr 25, 2010, 11:21 PM   #6
Yvan256
macrumors 601
 
Yvan256's Avatar
 
Join Date: Jul 2004
Location: Canada
The following prefixes are used by different browsers:
-webkit-property = Webkit-based browsers (Safari, Chrome)
-moz-property = Gecko-based browsers (Firefox)
-o-property = Opera
-ms-property = Internet Explorer

These vendor-specific extension exists when a CSS property is still a draft. That way your CSS can still be valid.

You need to add this to your "validation links":
&profile=css3

I'm not sure why it's not working for you. Be aware that sometimes the validator will tell you a line isn't valid but the real problem might be a line or two before that.
__________________
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. -Tom Cargill, Bell Labs.
Yvan256 is offline   0 Reply With Quote
Old Apr 26, 2010, 08:14 AM   #7
e7e
Thread Starter
macrumors member
 
Join Date: Dec 2007
I finally got this working, thanks alot for the answers guys, I really appreciate it.
__________________
15 inch Macbook Pro Retina 2.3 , 16 GB RAM;
Iphone 5;
Ipad 2
e7e is offline   0 Reply With Quote
Old Apr 26, 2010, 09:34 AM   #8
7on
macrumors 68040
 
7on's Avatar
 
Join Date: Nov 2003
Location: Fishman Island
I am looking forward to the final CSS3 approval so we can skip the browser prefixes.
__________________
jonshipman.com
7on is offline   0 Reply With Quote
Old May 2, 2010, 06:07 AM   #9
Renese-Williams
macrumors member
 
Join Date: Jan 2010
Quote:
Originally Posted by 7on View Post
I am looking forward to the final CSS3 approval so we can skip the browser prefixes.
I'm just waiting until IE becomes standards compliant.
Renese-Williams is offline   0 Reply With Quote
Old May 2, 2010, 11:22 AM   #10
SailorTom
macrumors regular
 
Join Date: May 2008
Quote:
Originally Posted by Yvan256 View Post
You need to add this to your "validation links":
&profile=css3
Can you explain this in more detail please? I'm quite a fan of css3 and not really that fussed about showing validated code, but it's still nice to get the satisfaction
SailorTom is offline   0 Reply With Quote
Old May 3, 2010, 02:01 PM   #11
7on
macrumors 68040
 
7on's Avatar
 
Join Date: Nov 2003
Location: Fishman Island
Quote:
Originally Posted by Renese-Williams View Post
I'm just waiting until IE becomes standards compliant.
Just <--if IE> it and show a "Required plugin missing" box that points to Google Chrome Frame.
__________________
jonshipman.com
7on is offline   0 Reply With Quote
Old May 4, 2010, 06:02 AM   #12
e7e
Thread Starter
macrumors member
 
Join Date: Dec 2007
Hmm is IE8 and Opera currently not CSS3 supported?

I tried running this:

Code:
-o-box-shadow: 1px 1px 1px #999;
-ms-box-shadow: 1px 1px p1x #999;
And it wont work in IE nor Opera.
__________________
15 inch Macbook Pro Retina 2.3 , 16 GB RAM;
Iphone 5;
Ipad 2
e7e is offline   0 Reply With Quote
Old May 4, 2010, 12:55 PM   #13
7on
macrumors 68040
 
7on's Avatar
 
Join Date: Nov 2003
Location: Fishman Island
Quote:
Originally Posted by e7e View Post
Hmm is IE8 and Opera currently not CSS3 supported?

I tried running this:

Code:
-o-box-shadow: 1px 1px 1px #999;
-ms-box-shadow: 1px 1px p1x #999;
And it wont work in IE nor Opera.
Nope. CSS3 will be supported in IE9 and Opera, IIRC, only supports approved standards. Does just plain ole' box-shadow without the prefix work?
__________________
jonshipman.com
7on is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Similar Threads
thread Thread Starter Forum Replies Last Post
New to HTML5/CSS3 etc... d88co88 Web Design and Development 27 Jan 31, 2012 08:53 AM
Is anyone able to perform Receipt validation?? aravind Mac Programming 15 Dec 6, 2011 09:21 AM
Browser CSS3 test clevin Mac Applications and Mac App Store 4 Jan 9, 2009 02:50 AM
CSS3 Web Fonts Nermal Web Design and Development 3 Apr 15, 2008 12:03 PM


All times are GMT -5. The time now is 01:26 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC