Reply
How To Make Custom CSS?
Old 11-06-2009, 04:37 PM How To Make Custom CSS?
Physicsguy's Avatar
Extreme Talker

Posts: 185
Name: Physicsguy
Location: On Earth
Trades: 0
Hello world,

I was wondering, is it possible to make a custom CSS class?

Sort of like:

#testDIV {
width: 100px;
height: 100px;
3dfactor: z4;
}

Obviously, there is no '3dfactor' in CSS. I'm asking if there is a way to program it in, so you can make your own custom statements.

Thanks!
Physicsguy is online now
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
 
When You Register, These Ads Go Away!
Old 11-06-2009, 06:00 PM Re: How To Make Custom CSS?
chrishirst's Avatar
Super Moderator

Posts: 22,216
Location: Blackpool. UK
Trades: 0
that would be a custom property and yes it is possible. (Microsoft have been doing it for years)

HOWEVER (and it's a biggie) you would have to write and maintain a customised DTD to tell useragents what it does, what to do with it and what it applies to AND write code to enable browsers to handle it of course.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-06-2009, 06:06 PM Re: How To Make Custom CSS?
Physicsguy's Avatar
Extreme Talker

Posts: 185
Name: Physicsguy
Location: On Earth
Trades: 0
Do I have a CSS DTD somewhere on my machine? Like my php.ini that I can edit?

All I want to add is a property called 'corner'. I need it to recognize stuff like this:

#cornerDIV {
background: #000000;
height: 100px;
width: 100px;
corner: r30px;
}

OR

corner: 30%;

and things like

corner-tr
corner-br
corner-tl
corner-bl

That's it. The r is for Radius, which is how round the corner it, how far up the box it starts and ends.

The corner will work by creating pixels in a corner-like shape. The reason for corner: is so you can put rounded corners on background images that change. I was making a site for a friend, and he had a fractal as the BG Image. I was trying to make rounded corners, but I couldn't get them because the background image kept showing through. I was probably doing it wrong anyway, but I still this feature would be cool.
Physicsguy is online now
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
Old 11-06-2009, 06:09 PM Re: How To Make Custom CSS?
chrishirst's Avatar
Super Moderator

Posts: 22,216
Location: Blackpool. UK
Trades: 0
No the DTD would have to be in a publicly accessible location.

Would in not indeed be simpler to use something such as;

http://www.spiffycorners.com/ ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-06-2009, 06:11 PM Re: How To Make Custom CSS?
chrishirst's Avatar
Super Moderator

Posts: 22,216
Location: Blackpool. UK
Trades: 0
or hang around until CSS3 becomes standard

http://www.css3.info/preview/rounded-border/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-06-2009, 06:11 PM Re: How To Make Custom CSS?
Physicsguy's Avatar
Extreme Talker

Posts: 185
Name: Physicsguy
Location: On Earth
Trades: 0
That looks cool, but the one thing is is that it can't make a background image. Try putting the background as an image, and they won't work any more.
Physicsguy is online now
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
Old 11-06-2009, 06:12 PM Re: How To Make Custom CSS?
Physicsguy's Avatar
Extreme Talker

Posts: 185
Name: Physicsguy
Location: On Earth
Trades: 0
Quote:
Originally Posted by chrishirst View Post
or hang around until CSS3 becomes standard

http://www.css3.info/preview/rounded-border/
Dang! Thanks!!
Physicsguy is online now
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
Reply     « Reply to How To Make Custom CSS?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.12344 seconds with 13 queries