hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Design and Content : Inline CSS -> Set for deprecation
Reply

Web Design and Content Subjects include, HTML, graphics, editors, CSS, Flash, graphics creation, placing of ads, ad serv companies, copyright, content and nearly anything else design related. Also talk about businesses that provide design services. If you link to your site, you must post in Web Site Reviews.
Forum Jump

Inline CSS -> Set for deprecation

Reply Post New Thread In Web Design and Content Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-04-2006, 04:42 PM
seodevhead seodevhead is offline
Web Hosting Evangelist
 
Join Date: Aug 2005
Location: EIB Network
Posts: 474
*

Inline CSS -> Set for deprecation


On one of my web applications I am developing, I am having difficulty finding a way around using inline CSS (ie. <p style="color: #FFF;"> ) for a few various elements.

I was wondering if inline CSS styling through the style attribute is set to be deprecated at any point in the future with XHTML? Is it perfectly acceptable to use inline styling like above? I have always done everything with external stylesheets, but on this particular application I am finding myself stuck with having to use inline CSS on a couple of occassions. Thank you for your help in this matter.

__________________
People train run out of Stubville.

Reply With Quote


Sponsored Links
  #2  
Old 10-04-2006, 06:19 PM
Website Rob Website Rob is offline
learning is in the doing
 
Join Date: Sep 2000
Location: Alberta, Canada
Posts: 3,109
I do not believe 'inline' styling is set to be deprecated within our Lifetime.

What you could do though, for ease of use & reference, is to create a normal style in your CSS then document; the page, why that styling is used, etc.

__________________
PotentProducts.com - for all your Hosting needs
Helping people Host, Create and Maintain their Web Site
ServerAdmin Services also available

Reply With Quote
  #3  
Old 10-04-2006, 11:10 PM
the_pm the_pm is offline
Community Liaison 2.0
 
Join Date: May 2004
Location: Akron/Canton, Ohio (USA)
Posts: 11,114
Quote:
I was wondering if inline CSS styling through the style attribute is set to be deprecated at any point in the future with XHTML?
IIRC, inline styles are deprecated in XHTML 1.1, and are forbidden in the pending release of XHTML 2.0.

Just set a class and set the style outside of the document structure in your style sheet.

__________________
Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

Reply With Quote
Sponsored Links
  #4  
Old 10-05-2006, 01:13 AM
Website Rob Website Rob is offline
learning is in the doing
 
Join Date: Sep 2000
Location: Alberta, Canada
Posts: 3,109
Looks like I need to do more Book learning.

__________________
PotentProducts.com - for all your Hosting needs
Helping people Host, Create and Maintain their Web Site
ServerAdmin Services also available

Reply With Quote
  #5  
Old 10-05-2006, 10:05 AM
seodevhead seodevhead is offline
Web Hosting Evangelist
 
Join Date: Aug 2005
Location: EIB Network
Posts: 474
Quote:
Originally Posted by the_pm
IIRC, inline styles are deprecated in XHTML 1.1, and are forbidden in the pending release of XHTML 2.0.

Just set a class and set the style outside of the document structure in your style sheet.
Hey thanks the_pm! When you say "set the style outside of the document structure" does that mean completely external? Or can I place the style in the <head> section (embedded CSS I believe it is called)?

Because my styling is actually coming from a database, I am unsure how to handle this. And because to my knowledge I can't make an external CSS file be dynamic (ie. PHP)... I am unsure what to do. Thanks.

__________________
People train run out of Stubville.

Reply With Quote
  #6  
Old 10-05-2006, 11:01 AM
the_pm the_pm is offline
Community Liaison 2.0
 
Join Date: May 2004
Location: Akron/Canton, Ohio (USA)
Posts: 11,114
Why not simply store all of your style information inside a .css document? CSS allows you to keep style information in one spot without any redundancy. That's its charm

If you're worried about being able to style it from a CMS-type editor, perhaps you have the ability to edit and save certain information as flat files?

CSS within your <head> section is allowed in XHTML 1.1. I'm not sure about 2.0, but 2.0 is a working draft, not even close to release. So I wouldn't worry about it for the time being (it's going to be radically different from the (X)HTML to which we've grown accustomed).

<style type="text/css">
<![CDATA[
.class { style:value; }
]]>
</style>

That's how you tell the XML parser to ignore the data within your <style> section. It's safe to use on XHTML 1.0 too.

__________________
Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

Reply With Quote
  #7  
Old 10-05-2006, 03:49 PM
Fixago Fixago is offline
Web Hosting Evangelist
 
Join Date: Apr 2006
Posts: 540
Quote:
Originally Posted by seodevhead
Because my styling is actually coming from a database, I am unsure how to handle this. And because to my knowledge I can't make an external CSS file be dynamic (ie. PHP).
To make a PHP file act as a CSS file, and ultimately be dynamic, you would put it in a directory and then adjust how Apache handles CSS files so it would handle them as PHP files by putting (simplest way) an .htacces file in the same directory as the CSS files. Like so:

AddType application/x-httpd-php css

That way, you can put PHP code in your *.css files and it will work Oh, and you would want to make sure to set the content-type in the "PHP" file so it outputs the CSS file properly.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Mozilla Firefox 23 Will Block Mix SSL Content by Default Web Hosting News 2013-04-12 11:39:07
The Demise of Google Reader Blog 2013-03-14 13:21:34
Web Host Billing System WHMCS Deals with Support Challenges, Network Issues Web Hosting News 2012-09-14 10:36:58
StillSecure Launches Managed Security Service Suite for Public Cloud Web Hosting News 2012-05-04 09:55:31


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?