StyleSheet Maker

Home » Forums » Stylesheet Maker » StyleSheet Maker


Senior Advisor
2,121 posts
Online Now

So I spent the weekend reading up on CSS and trying to learn how to implement it. I'm wanting to re-design my website and make it more pleasing. It's currently made from a template/quick start on-line designer, which is fine I guess but I want it to be better.

After I went through several tutorials, I now feel I have a good enough grasp of the basics to start implementing this. I went to CC's Style Sheet Maker and opened up a "new stylesheet".
First thing I noticed was

<!-- Style Sheet created with the CoffeeCup StyleSheet Maker -->
<!-- http://www.coffeecup.com -->
<style type="text/css">
<!--

-->
</style>

Now correct me if I'm wrong (please), but this isn't at all what I was expecting. I don't believe a CSS file needs (or should have) the <style></style> tags. Aren't those only used in a HTML file for an inline stylesheet? From what I recall reading, I thought the stylesheet should contain this:
@charset "UTF-8";
as the top line, then start setting styles. Who needs sleep?


Registered User
27 posts

You are correct, the <style></style> tags are not needed or should be in the style sheet coding. I believe CC CSS Maker is designed to make the style sheet to be posted inline with HTML or to create the CSS file. IF you think about it, it's cool that it is included. Cut, copy, paste and IF you are using it in a HTML, you're done. IF you are not using it in a HTML, delete the style tags. Happiness is a cup of coffee and a good mouse.

Rick


Senior Advisor
2,121 posts
Online Now

Understood, and I can see the benefit. Maybe a "Wizard" to allow user to indicate where the stylesheet would be used (inline or file), then automatically set up for the appropriate protocol.

On a side note, but related topic. If one was to find a website that uses CSS that they like, how would they be able to see the CSS file? Is this something that you must have FTP access for? I have found several sites that I like and want to learn from (maybe sample part of) to implement a CSS into my site. I have tried several ways and see the CSS file in their HTML that they are referencing, but I can't seem to find a way to see the contents of that file. I understand that it's probably protected to some degree, to prevent sabatoge by hackers, but is it standard to hide it completely from public view?

Thanks,
Phil Who needs sleep?


Ambassador
1,058 posts

I've never had a problem viewing a style sheet I needed to look at. A couple Firefox add-ons that will help in this regard are Firebug ( https://addons.mozilla.org/en-US/firefox/addon/1843 ) and JSView ( https://addons.mozilla.org/en-US/firefox/addon/2076 ).

JSView puts a button at the bottom of the browser window which allows you to easily open any attached .js or .css files.

Firebug lets you see how style rules cascade and affect the currently selected element and you can modify the styles and immediately see how the changes affect the page.

Another two add-ons that are nice to have around are the Web Developer ( https://addons.mozilla.org/en-US/firefox/addon/60 ) and HTML Validator ( https://addons.mozilla.org/en-US/firefox/addon/249 ).


Senior Advisor
2,121 posts
Online Now

Cool, thanks Cary. I'll start implementing those and hopefully they'll be the answer to what I need. I was really hoping that I could see other sites files as an example. I can learn somethings from books, or tutorials, but I learn so much more by looking at 'real life examples' and experimenting with them. Who needs sleep?


Ambassador
1,058 posts

It is possible that some sites will try to compact there css code when they put it online so it's all on one line, which can be very difficult to follow. Some editors can reformat such code for easy reading.


Senior Advisor
3,144 posts

Phil,

Also you can use most any browser to view the source code for the page, and find the entry for the style sheet. If you enter that URI into you address bar, you should see the CSS file. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Senior Advisor
2,121 posts
Online Now

That did it Bill. Funny, I tried that earlier today and got a 404 Error code? Guess it just didn't want to play then. I got what I was looking for this time though. Yay! Now I can continue my learnin' :) Who needs sleep?

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.