Can I put style sheet in the root folder that targets a specific html page

This is a discussion on "Can I put style sheet in the root folder that targets a specific html page" within the Web Page Design section. This forum, and the thread "Can I put style sheet in the root folder that targets a specific html page are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 14th, 2007, 10:31
New Member
Join Date: Jun 2007
Location: AUSTRALIA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Can I put style sheet in the root folder that targets a specific html page

(Newbee)
Can a CSS stylesheet do this ?
I have a site with all the files , images, html, and .js files in the root folder. I have my reasons for doing it this way.

Can I put style sheet IE ( <style type="text/css"> ) in the root folder that targets a specific html page, say "page1.html" ?
Or must I create a seperate folder in the root dir to hold external CSS stylesheets that apply to various pages IE: page1.html, page2.html,page3.html ect. ?
<link rel="stylesheet" type="text/css" href="css/global.css" />
How would I write the link to target the specified webpage ?
TIA
Badger
Reply With Quote

  #2 (permalink)  
Old Jul 14th, 2007, 12:53
New Member
Join Date: Jul 2007
Location: UK
Age: 34
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to darrenosborne
Re: Can I put style sheet in the root folder that targets a specific html page

i don't quite get what you mean.

you can have as many css files on your website as you want and only the ones you link on the page will be used.

One recommendation i would personally make is as follows:

example: you have three pages, one is red, one is blue and one is orange.

Have one css file for your general layout and add that to every page.

then have three more css files, red.css, blue.css and orange.css which add the colour and attach them to the page directly after your main css file.

Also if you have any changes to your layout for the specific pages, you can add them there as well.

Hope this helps, if i've got your question wrong, please enlighten me and I'll get back to ya.
Reply With Quote
  #3 (permalink)  
Old Jul 14th, 2007, 17:26
New Member
Join Date: Jun 2007
Location: AUSTRALIA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Can I put style sheet in the root folder that targets a specific html page

Thanks Darren I see what you mean. I just need to be sure of the css path for the page. say blue.css

If blue .css is in my root Dir, I'm not sure of the code link on the blue.html page to call the css file.

Hope you understand what I mean.
Reply With Quote
  #4 (permalink)  
Old Jul 14th, 2007, 17:35
New Member
Join Date: Jul 2007
Location: UK
Age: 34
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to darrenosborne
Re: Can I put style sheet in the root folder that targets a specific html page

a lot of it depends on your hosting. If your css is in the same folder at the pages, you should be able to just put the filename.

Code: Select all
<link rel="stylesheet" type="text/css" href="orange.css" />
that should work.

if you want is relative to your root directory (like public_html or wwwroot), try

Code: Select all
<link rel="stylesheet" type="text/css" href="/orange.css" />
or if you have it in a folder out of the way,

Code: Select all
<link rel="stylesheet" type="text/css" href="/style/orange.css" />
any help?
Reply With Quote
Reply

Tags
newbee

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Style sheet isnt working kaz Web Page Design 19 Dec 21st, 2007 01:10
CSS Print Style Sheet Problem bennyboy7 Web Page Design 1 Aug 14th, 2007 08:58
new to css: what's the best way to insert image using the external style sheet? mad samuel Web Page Design 14 Aug 10th, 2007 17:52
How to tell IE7 to use a pariticular style in a single style sheet figo2476 Web Page Design 5 May 25th, 2007 14:23
Linking to an external style sheet ahm531 Web Page Design 6 Aug 31st, 2006 13:23


All times are GMT. The time now is 13:39.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43