473,573 Members | 3,198 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

type="text/css" (?)

Is the link rel="stylesheet " supposed to be real plain text,
or would some word processor format such as Word/Pad work?

This sample stylesheet seems garbled if downloaded and
opened with Notepad, but seems to view right in browser.
Could this be a problem, or cause slow loading when applied?

A link for this sample "style.css" is on
http://users.ntplx.net/~richw/
Thanks for any advice, Rich
Jan 31 '06 #1
7 2291
Rich wrote:

This sample stylesheet seems garbled if downloaded and
opened with Notepad, but seems to view right in browser.
Could this be a problem, or cause slow loading when applied?

The file uses only a linefeed character as a newline indicator, likely
generated on a unix-ish environment. Notepad is too stupid to realize
that; it expects a carriage-return/line-feed pair as a newline.
There is no performance effect whatsoever. (Well, loading time is
microscopically faster since there is one char instead of two for each
newline.)

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jan 31 '06 #2
Stylesheets do use plain text format, not some bizarre word processor
encoding (as you imagine). Complications occasionally arise because
different platforms encode new lines in text files differently.

For example, for a newline UNIX writes just a line feed (LF) control
character, Mac writes a carriage return (CR) control character, and DOS
writes both CR & LF control characters.

The effect you see in Notepad, where all the text is in one long
wrapped line, with little box characters in between, is because the
newlines are encoded differently from how Notepad expects. Perhaps
"style.css" was authored on another platform?

Notepad is primative.
Wordpad's a bit smarter with newline handling.
You can use Wordpad to view & edit the file, providing you save the
file as text.

Tasman

Rich wrote:
Is the link rel="stylesheet " supposed to be real plain text,
or would some word processor format such as Word/Pad work?

This sample stylesheet seems garbled if downloaded and
opened with Notepad, but seems to view right in browser.
Could this be a problem, or cause slow loading when applied?

A link for this sample "style.css" is on
http://users.ntplx.net/~richw/
Thanks for any advice, Rich


Jan 31 '06 #3
Tasman wrote:
Stylesheets do use plain text format,


Technically, a CSS stylesheet is not _plain_ text (media type
text/plain) but of type text/css.

The definition of text/css does not specify how line breaks are to be
represented, and it does not need to, since a line break is just white
space in CSS syntax, see
http://www.w3.org/TR/REC-CSS2/syndata.html#syntax

Thus, whether you use Carriage Return, Line Feed, or space, or any
sequence of these, the meaning of a style sheet does not change. The
visual rendering of a style sheet, when viewed e.g. in a text editor,
might be affected, but that's external to CSS.
Jan 31 '06 #4
Tue, 31 Jan 2006 01:08:09 -0500 from Rich <ri***********@ ntplx.net>:
Is the link rel="stylesheet " supposed to be real plain text,
or would some word processor format such as Word/Pad work?


I don't know what "Pad" might be, but if by "Word" you mean Microsoft
Word then its native format is _not_ suitable for text/css. You can
export plain text in the File >> Save As dialog, but why not just use
a decent text editor to begin with?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Jan 31 '06 #5
Rich <ri***********@ ntplx.net> wrote in news:43DEFEC9.6 90E0656
@ntplx.net:
Is the link rel="stylesheet " supposed to be real plain text,
or would some word processor format such as Word/Pad work?

This sample stylesheet seems garbled if downloaded and
opened with Notepad, but seems to view right in browser.
Could this be a problem, or cause slow loading when applied?


Is it garbled or just has a strange character occasionally while
everything is on one line? I suspect it is a Unix file that uses
slightly different end of line notation (one character rather than two
as in DOS/Windows). But yes, it is a plain text file. Try a better
editor such as Crimson (http://www.crimsoneditor.com/) and it should
display as it should. Notepad sucks.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
Jan 31 '06 #6
Rich wrote:
A link for this sample "style.css" is on
http://users.ntplx.net/~richw/
Thanks for any advice, Rich


And then ... you need to rethink your usage of fixed font sizes. IE will
not allow visitors with visual disabilities to resize your micro fonts.
Use percentages, 100 of them for normal content, larger for <hx>
elements and slightly smaller for legalese, maybe 85%.

Drop Verdana.
http://xs4all.nl/~sbpoley/webmatters/verdana.html

Your entire style sheet could be about half the size if you didn't
repeat everything. The C of CSS is Cascading.

--
-bts
-Warning: I brake for lawn deer
Jan 31 '06 #7
"Beauregard T. Shagnasty" wrote:

Rich wrote:
A link for this sample "style.css" is on
http://users.ntplx.net/~richw/
Thanks for any advice, Rich


And then ... you need to rethink your usage of fixed font sizes. IE will
not allow visitors with visual disabilities to resize your micro fonts.
Use percentages, 100 of them for normal content, larger for <hx>
elements and slightly smaller for legalese, maybe 85%.

Drop Verdana.
http://xs4all.nl/~sbpoley/webmatters/verdana.html

Your entire style sheet could be about half the size if you didn't
repeat everything. The C of CSS is Cascading.

--
-bts
-Warning: I brake for lawn deer


Thank you all for the education. This is part of a complex site
with MS-asp/database config. purchased by our non-profit. I have
just been trying to figure it out. Will pass on the ideas to our
webmaster. Cheers Rich ctrivers.org
Feb 1 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
17572
by: j.t.w | last post by:
Hi All. I'm having a problem with my Date of Birth textbox. When I open the ..htm file, the "DoB" textbox is flat with a border. All of my other textboxes are sunken and are yellow. When I change the name of the "DoB" textbox to something like "Telephone" or "TelephoneBirthdate", the textbox changes to sunken, and yellow. I have tried...
1
2930
by: Neil Zanella | last post by:
Hello, I would like to use CSS to apply a width of 100% to all <input> elements, but to only those that have an type attribute set to "text", without affecting check boxes, radio buttons, etc... How can this be accomplished with CSS? Thanks,
9
5352
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot of try. Thanks in advance.
9
13386
by: David D. | last post by:
Does the file extension matter when including a JavaScript file in an HTML page? Normally, one would include a JavaScript file in an HTML page using <script src="foo.JS" type="text/javascript"> However, I have found that I can use an alternate file extension, such as <script src="foo.HTML" type="text/javascript"> It works fine with my...
3
3249
by: Silmar | last post by:
Hi! In my form I have table which cells contain input objects of type="text" which initially are disabled. I would like to activate them by clicking on them. However because input object does not support onClick event (or maybe I am wrong?) I use onClick events of table cells. And it works as required in IE 6. I click on the input object...
6
5234
by: Jon Davis | last post by:
I recently learned how to do an <OBJECT> alternative to <IFRAME> in current browsers using: <object id="extendedhtml" type="text/html" data="otherpage.html" width="250" height="400"></object> My question is how do I access the document DOM of this object in Javascript? For example, "alert(extendedhtml.innerHTML);" doesn't work and...
1
2649
by: i_dvlp | last post by:
I'm attempting to size a table and its proving to be difficult, when the <td> contain input type="text" It seems any width spec using <col width="50"> works fine, but only when it applies to text ( not <input> ) I also read through a 2005 post where a person attempted to put <col ....> tags in a CSS definition (in the head...
3
7814
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript" src="funcs3.js"></script> ? And I need to use similarly multiple CSS:
9
4367
by: Steve | last post by:
Hi; I've being going through some legacy code on an old JSP site I have been patching. I noticed that when I save the JSP down to my PC as an HTML file I get this javascript error in IE 6 ( not in the latest Firefox ): "invalid character" The problem traces back to this line of code:
0
7741
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7661
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7977
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8165
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5252
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2163
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
984
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.