Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 17th, 2006, 3:08 PM   #1
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: WA, USA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
why CSS

why is using CSS such a good thing? i know it can be used to globaly change the apperace to web pages with just one file. But it doest change the content of page. please tell me the advantages of using it. i personaly dont see why to use it.(i have never done any big time web devepment)
mrynit is offline   Reply With Quote
Old Mar 17th, 2006, 4:26 PM   #2
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
The reason you can change your website's lay-out is an important reason, of course. Another is cleaner, better structured code (for example: the lay-out and the content of the webpage is splitted).
Polyphemus_ is offline   Reply With Quote
Old Mar 17th, 2006, 5:36 PM   #3
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
As Polyphemus said, a cleaner and more structured code. CSS allows a lot of great effects and enables you to fully have controll over the site's layout and design. CSS is very easy to learn and it's great!
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Mar 17th, 2006, 6:08 PM   #4
a thing
Unverified User
 
a thing's Avatar
 
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power: 0 a thing is on a distinguished road
  • It's easier to manage your code.
  • It uses less bandwidth, considering the CSS file is cached, which it usually is. See the filetype stats for my server.

Quote:
Originally Posted by mrynit
But it doest change the content of page.
It's not supposed to. It's just a stylesheet language. Use XHTML for the content.
__________________
Warning: My posts may change (dramatically) within the first 15 minutes they're posted.
Got 'Nux?—GNU/Linux and other free software support.
It's GNU/Linux, not just Linux.
a thing is offline   Reply With Quote
Old Mar 17th, 2006, 6:43 PM   #5
MrMan9879
Programmer
 
MrMan9879's Avatar
 
Join Date: Sep 2005
Location: Nanaimo, BC, Canada
Posts: 97
Rep Power: 0 MrMan9879 is an unknown quantity at this point
Send a message via MSN to MrMan9879
A note to a thing...

Your link goes to the IP address: 192.168.1.111. That is not really your IP address. I'm guessing that you are behind a router firewall. Routers give an IP address to hide your real one from the rest of the world. If you're connecting to your server on your own computer, or on LAN, you can use that IP address, but for the rest of the world, we have to use your real IP address.

Here's a link to a page that shows your real IP address: http://www.ipchicken.com/
MrMan9879 is offline   Reply With Quote
Old Mar 17th, 2006, 6:56 PM   #6
a thing
Unverified User
 
a thing's Avatar
 
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power: 0 a thing is on a distinguished road
Heh, whoops, I used that to test it without going through the Internet. It's a big page, 81KB, that takes 2 seconds to load & render using the LAN IP and my server's on my home connection. Here's the link:
http://a-thing.is-a-geek.net/stats.xhtml#filetypes
(It won't let me edit anymore.)
__________________
Warning: My posts may change (dramatically) within the first 15 minutes they're posted.
Got 'Nux?—GNU/Linux and other free software support.
It's GNU/Linux, not just Linux.
a thing is offline   Reply With Quote
Old Mar 17th, 2006, 6:57 PM   #7
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Ask MJordon2nd to edit it for you or delete it.
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Mar 17th, 2006, 7:35 PM   #8
AICkieran
Programmer
 
Join Date: Jan 2006
Location: UK
Posts: 55
Rep Power: 3 AICkieran is on a distinguished road
Quote:
Originally Posted by mrynit
why is using CSS such a good thing? i know it can be used to globaly change the apperace to web pages with just one file.
You answerd your own question there pretty much.

Picture this, You have a large website with a few hundred pages or more, You're getting bored of the style of your pages, Would you rather edit each page or 1 file.

Also it allows you to keep a more consistant look easier. You dont have to mess around applying the same styling to each new page, Just include the global stylesheet

Hope this answers your question.

-kieran
AICkieran is offline   Reply With Quote
Old Mar 17th, 2006, 10:30 PM   #9
Lich
Professional Programmer
 
Lich's Avatar
 
Join Date: May 2005
Location: Detroit
Posts: 254
Rep Power: 4 Lich is on a distinguished road
Send a message via AIM to Lich Send a message via MSN to Lich
Quote:
Originally Posted by mrynit
why is using CSS such a good thing? i know it can be used to globaly change the apperace to web pages with just one file. But it doest change the content of page. please tell me the advantages of using it. i personaly dont see why to use it.(i have never done any big time web devepment)
Imagine this:, say you were working for a client and he says he want's to use all of X part of a page to have blue text. So you type
[HTML]<font color="#0000FF">Text here...</font>[/HTML]
And you finish the website. There's 80+ pages on there with the blue text somewhere in there. Then out of the blue he decides, "you know what, I want that text to be red instead". So now you have to go through and edit each page yourself to change the text. Now, if you'd used CSS on those pages, you would have put in:
[HTML]<span class="coloredText"Text here...</span>[/HTML]
That code would link to the CSS file you define that has the class colouredText defined, and in there you change #0000FF to #ff0000 and the whole site is updated.

That's why we use CSS. it saves time, money, bandwith, etc. No reason not to use it.
__________________
--John Cruz
Web Developer
www.cruzweb.net
Lich is offline   Reply With Quote
Old Mar 17th, 2006, 11:48 PM   #10
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: WA, USA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
:banana:
time to use css
mrynit is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC