CSS

Denmark 3's picture

They have: 881 posts

Joined: Feb 2000

What is it and how does it work? I feel like such a dummy. Thanks!

They have: 429 posts

Joined: Jul 2000

CSS = Cascading Style Sheets.

CSS is displayed in huge long lines, such as this:

a { color : black ; font-size : 10px; font-family : Tahoma ; margin-left : 3px ; margin-top : 300px ; }
#9787 { filter : alpha(opacity=50} ; height : 900px ; left : 190 ; }
.thing { text-decoration : none ; }

That right there explains the types of CSS things you're "allowed" to use.

a { color : black ; font-size : 10px; font-family : Tahoma ; margin-left : 3px ; margin-top : 300px ; }

Look at the beginning of this line. What's that? An A. This tells the browser that all of the tags are to be governed by this CSS rule.

Without going into too much detail about this line, it basically says: Black Text, 10 pixels tall, in Tahoma, with a 3 pixel and a 300 pixel margin to the left and top, respectively.

Next, we move onto ID's.

#9787 { filter : alpha(opacity=50} ; height : 900px ; left : 190 ; }

The beginning of this line is #9787. This is to be used for all things that will be ID'd as such. This is declared like so [using the tag as an example, although this will work for most any tag.]

Blah

This makes it so that "Blah" is at an opacity of 50%, has a height of 900px, and left position of +190.

Now, we move onto classes.

.thing { text-decoration : none ; }

This can be integrated into a web page like so:

Huh?

This will yeild that "Huh?" will have no text-ecoration, which means no underline, overline, etc.

CSS can be used in a multitude of ways, which can range from the simple [such as making certian text a certian color] to the complex [a huge XML Database.]

CSS is the main core of IE-based XML, which means: I LOVE IT A LOT! Also, the main flaw of CSS is that Netscape is in the dark about CSS. Microsoft has implemented so many innovations on the language, while Netscape hides behind "standards" that mean that us designers get the short end of the stick.

Class dismissed.

Mike Fisher - TWF Conquerer
"Don't trust a spiritual leader that cannot dance."

They have: 61 posts

Joined: Aug 2000

....what many other things can't.

Works mainly in Internet Explorer, some in Netscape.

Have you ever heard of cascading style sheets? well that's CSS. CSS basicly formats the look of the "standard" HTML. For example:

Having a link change color, size, or font on mouseover. Or perhaps you don't like the ugly underlines underneath the links on your website. Add some CSS and the underlines disapear. If you want the underlines to come back on mouseover then just change the CSS.

CSS also works great for backgrounds. For example, I just built a website where I didn't want to have a large background picture tile; just wanted to have it display once, and I wanted it centered on the page, and I didn't want it to scroll. So I added CSS, works fine in IE, Netscape, well, it's Netscape.

CSS can be applied before and after text in tags, but is mainly used in the head. CSS makes it really easy to add different formats to different text. For example, I put CSS code in the head of my document and I put a tag, for instance, a tag around text and it all changes to whatever I want it to. It is also VERY helfull to alter the "default" of H1, H2, H3, ect tags. Instead of them going to their default you can have them go to whatever you choose!

I also use a *.CSS file that I link to in my head in all my pages. That way if I want to change the color of links, I just change one file and the 500+ pages on my site all do the same, with the change of one file! Works like a champ!

How about changing the font someone puts into a form field? that can be altered with CSS. Borders around paragraphs? CSS. Page breaks for printing purposes? CSS.

CSS is great, but ya got to watch it, can't rely totally upon it, becasue older browsers don't support it. And even Netscape doesn't do so well with it all the time.

hope this helps,

alex

[=1]Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.[/=1]

They have: 429 posts

Joined: Jul 2000

As I've always said: Netscape now runs on the hype and projected image that Microsoft is bad, and even those supports are starting to turn to IE because Netscape hasn't had a major advancement since they started supporting DHTML.

Mike Fisher - TWF Conquerer
"Don't trust a spiritual leader that cannot dance."

They have: 61 posts

Joined: Aug 2000

Thank You Mr. Fisher,

I didn't go into detail, and I wouldn't have posted what I put had I read yours. Replied, and got side tracked, you must have replied before I had a chance.

exbabylon@hotmail
Selkirk Graphic and Web Design- "Imagination is the Only Limitation!"

[=1]Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.[/=1]

Denmark 3's picture

They have: 881 posts

Joined: Feb 2000

How do I put css in a page? I want to do the link thing so I don't have to update like 500+ pages that I have on my site. I won't mind doing it just this once but after this I dont want to keep updating like I would have to without the css. So how do I put it in like that?

They have: 334 posts

Joined: Dec 1999

Create an external file named foo.css In it put all your assigned behaviors, things like:

B {

font-family : verdana, arial
font-size : 9pt;
font-weight : bold;
color : black;
}
H3 {
font-family : trebuchet ms, helvetica, sans serif;
font-size : 14pt;
font-weight : bold;
color : white;
background : 000059;
}

etc etc etc

Upload the foo.css file to your server

Link to it with the following tag in the HEAD section of your documents:

Then, you can change the single foo.css file to make global changes to the entire site, making it possible to change colors, fonts, backgrounds, positioning, etc on hundreds of pages by editing a single file. Combine CSS with included files for things like navigation bars, headers and footers and site maintainance and updates/remodels become a breeze.

Just a word of caution: While CSS can be a godsend in the power it offers, it's also a nightmare due to the differences in how NN and IE render certain things (or more accurately, in the way NN refuses to render certain things). It's really aggravating to come up with exactly the effect you're looking for in IE only to discover that the same codes looks like trash in NN. Frustration levels can be high. Good luck Wink

They have: 429 posts

Joined: Jul 2000

Blah. Netscape users represent the last 14% of the iternet. I don't see why they just don't switch over... but, oh well.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I think the percentage is higher [I heard 40% somewhere, but that's probably to high].

Think about it. AOL bought Netscape, right?
So what do you think AOL is using as it's browser?
Now how many numb skulls use AOL?

Please don't get me wrong. I HATE Netscape. Microsoft is the way to go for browsers.

Another thing to consider... How many AOL users know that they're not on the web? AOL has everyone confused with their stupid 'keywords' that some AOL users [that I have talked to] don't know what to do with a URL!

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 383 posts

Joined: Sep 2000

I’ve heard different numbers for Netscape. However it’s been around 15-17% for the past few months. Not long ago it was the other way around. Netscape is falling fast. Everyone I know who ‘was’ a die-hard Netscape fan now uses both or Internet Explorer exclusively.

Netscape’s main supporters are now corporate environments that continue to use Netscape and Netscape Mail servers. I’ve seen 3 clients of mine switch from Netscape to Microsoft in the past 3 months alone. And now that both the Windows and Macintosh world are dominated by Internet Explorer Netscape is no longer “king” of cross-OS operation.

Even with the purchase of Netscape AOL continues to use Microsoft Internet Explorer as its core component. I’ve heard speculations that the next version will use Netscape. But I believe AOL and Microsoft go WAY back and will always be technology partners.

Unless Netscape 6 jumps the enthusiasm for Netscape I believe UNIX and LINUX browsers will quickly become more dominate (in the stats anyway). Soon everyone who builds sites on a professional level will need 3-4 machines just for compatibility testing.

In terms of Style Sheets.. They are defiantly worth learning and understanding inside and out. The actual concept is very basic and it will give you a firm base for tackling DHTML. Web Monkey has some great articles at http://hotwired.lycos.com/webmonkey/authoring/stylesheets/

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi y'all,

Netscape's problems with css & dHTML stem from that fact that their ver 4 browsers came out way before http://www.w3.org ('the' site for raw information) published their standards. IE's ver 4 browser appeared closer to the publish date -- ergo -- better compliance.

CSS itself was developed to separate the content from the content's format -- sort of like what Windows' APIs & drivers do -- you plug in the format and the browser decides how to display it based on the hardware's type (monitor, projection screen, webTV, audio) and capabilities (resolution, colors, etc).

As mentioned above, css can also be included within the HTML page. Which means you can change the style dynamically with javascript (...onMouseover="this.style = somethingElse")

Parker: The inclusion of a css file does not necessarily mean all of your pages will be automatically updated -- you may need to id various elements, remove old formatting tags and code (otherwise they will override the style sheet), etc. However, once you make the change, you will have only one file to change for all future changes.

Vinny

Where the world once stood
the blades of grass cut me still

mjames's picture

They have: 2,064 posts

Joined: Dec 1999

On my web site, we use CSS - it's quite nice.

We have all of our CSS coding in a .css file and we can update it whenever and it will change on every page. If you want certain links to obey a CSS code, you can go , where the base="main" part changes according to your CSS code.

They have: 334 posts

Joined: Dec 1999

I believe the IE/AOL thing is a contract obligation. M$ paid AOL big bucks to commit to IE long-term before AOL bought Netscape. As far as I know that deal is still in effect and AOL must continue to use IE until it expires. Obviously at that point they'll switch over to NN as the default browser, but will it be too little too late? As a Microsoft-hater I hate to admit it, but deals with AOL and illegal business practices aside, IE 5 took over the web because it was a better browser than NN 4.x

Denmark 3's picture

They have: 881 posts

Joined: Feb 2000

I use AOL. I find it terrible I get signed off all the time. I am going to switch to Comcast Cable soon. I know it is available. I read about DSL around my area and it got bad ratings so I will go with Cable.

They have: 429 posts

Joined: Jul 2000

What the hell is everybody's problem with Microsoft?

Is it the fact that they actually make advancements?

Hell, all of those Windows "problems" are easily solved--I can leave my computer on for around a week without a loss in performance. You just need to fine turn Windows to suit your needs, and not bog down the system.

Also, their developer network is great! I enjoy everyone that I have conversed as a result of this group.

Sigh, I stray from the topic. Oh, and AOL pretty much turned IE into what I'd like to call "cheap crack whore."

Mike Fisher - TWF Conquerer
"Don't trust a spiritual leader that cannot dance."

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hello Gentle People,

As Mike implied, let's try to keep this thread on the topic. Otherwise, a new surfer will get verrrrry confused Smiling
Here on in, IE vs NN vs AOL posts should go to the General Discussion forum. In fact, I'll start a thread there regarding AOL's constant disconnects, just to get rolling.

Thanks Smiling

Vinny

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.