It shows that you are unregistered. Please register with us by clicking Here
![]() |
|
![]() |
![]() | Register - FAQ - Today's Posts - New Posts - Support - Search | ![]() |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Oct 2006
Age: 23
Posts: 176
|
Some CSS applies to every page of your document, other CSS applies only to one page. Do you put the CSS that applies to a single page on an external stylesheet as well, or do you put it on the page?
__________________
Don't gain the world and lose your soul, wisdom is better than silver or gold.
~Bob Marley~ |
|
|
|
|
|
|
|
#2 (permalink) |
|
Senior Member
Join Date: Aug 2006
Age: 28
Posts: 755
|
I seldom design pages that use a different set of styles from the rest of the site. It's bad idea to keep your styles changing unless you specifically need to.
If I do need to change something specific, it is either inline or in the page itself. If it has to come on more than 5 pages, I put it in a seperate stylesheet
__________________
Ajay D'Souza Techtites - Your daily dose of all things Tech! Sir Arthur Conan Doyle | I Sent This WebberZone Domains |
|
|
|
|
|
#3 (permalink) |
|
Senior Member
|
I use the @import on specific pages.
__________________
"The real hell is your life gone wrong." <---DONATIONS NEEDED, CLICK TO READ MORE---> |
|
|
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Aug 2006
Age: 28
Posts: 755
|
what exactly is the purpose of @import?
__________________
Ajay D'Souza Techtites - Your daily dose of all things Tech! Sir Arthur Conan Doyle | I Sent This WebberZone Domains |
|
|
|
|
|
#5 (permalink) |
|
Blogging Moderator
|
To point the browser to load the css file that the import points to. In this case you can make two css files; one with the css you need for those pages which require one of the css files, and a second one with the first one's css as well as the new changes for the other pages. And you can import each according to the need. Thank You
__________________
All About Google Adsense Keep up with what's going on in the Search Engine Optimization world check out Search Engine Optimization news today. Globalwarming Awareness2007 |
|
|
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Aug 2006
Age: 28
Posts: 755
|
Makes sense now, but I wonder why not just use the normal method of linking CSS files, using link
__________________
Ajay D'Souza Techtites - Your daily dose of all things Tech! Sir Arthur Conan Doyle | I Sent This WebberZone Domains |
|
|
|
|
|
#7 (permalink) |
|
Member
|
@import only works with new browsers, for example IE 4 and lower don't support it and thus they don't receive the styling and then mess up the layout with their lacking CSS support.
__________________
Indiana Jones |
|
|
|
|
|
#8 (permalink) | |
|
Blogging Moderator
|
Quote:
Thank You
__________________
All About Google Adsense Keep up with what's going on in the Search Engine Optimization world check out Search Engine Optimization news today. Globalwarming Awareness2007 |
|
|
|
|
|
|
#9 (permalink) |
|
Member
Join Date: Feb 2007
Posts: 42
|
I use CSS as external file, so in the header, in "style" part, I usually put where is my CSS file located, by that way I save lots of space of every html page of my website. I heard it's also faster than putting in the document.
|
|
|
|
|
|
#10 (permalink) |
|
Forum Management
|
I have my main CSS file containing a few @import:
@import url("layout.css"); /*layout css file*/ @import url("editor.css"); /*editor styles*/ @import url("custom.css"); /*Use this file to customize your website*/ The layout.css simply contains CSS for sizing and positioning of various elements The editor.css contains styles for the editor plugin The custom.css is where all appearance styles are defined. (Font colors, sizes, backgrounds, etc.) Not only does this make things easier to find, it also makes adding more style sheets a snap. No cut 'n pasting into your original CSS file is required. Just add it as an @import. This might start some argument, but I do not design for ancient browsers. There are simply too many other things to worry about these days.
__________________
Larry [Torn Elements] - Regaining the passion in design. [LarryMonte.Com] - Personal Blog (WIP) "Writing is the most fun you can have by yourself!" --Terry Pratchett ---- Gorgeous On Life - The world from a Cat's point of view! |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what is the use of internal keyword? | agaba175 | .NET | 1 | 08-04-2006 02:45 PM |
| Internal Server Error with 301 Redirect | kevin | Site and Server Administration | 0 | 08-01-2006 02:39 PM |
| External job with enterprise manager 10g | gabriel | Programming | 0 | 07-29-2006 02:30 PM |