3 replies [Last post]
Renata
Offline
newbie
Last seen: 13 years 5 weeks ago
Timezone: GMT-4
Joined: 2005-04-24
Posts: 7
Points: 8

Hi,

I am new with the "CSS" and i will like to know to structure well my files.

I have create folders: 1.-Website 2.- CssFiles insite the Website 3.-Images folder inside the Website, my question his where do i put my index.html, is that one go inside the "Cssfiles folder" ?? or do i have to create a folder for all my html .

Thank,

Renata

Tags:
Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 10 years 36 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

Create Files

index.html will go in your "document" root, that way the webserver will know where to find it.

e.g.

"www.mysite.com"

/
index.html
otherpage.html

/css
- mystyles.css

/images
- mylogo.gif
- mybackgroundimage.gif
- myroundedcorners.gif

/js
- myjavascript.js

assuming your webserver has a typical setup, when someone puts "www.mysite.com" into their web browser they will get your index.html page.

Renata
Offline
newbie
Last seen: 13 years 5 weeks ago
Timezone: GMT-4
Joined: 2005-04-24
Posts: 7
Points: 8

Create files

If i understand well, you mean i will have 4 folders:

index.html, css, images, js

Sorry it mind look stupid but i am very beginner's

Thank

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 20 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Create Files

As Chris has said your index.file lives in the top most public directory, on an Apache server you will see this as a folder commonly called public_html sitting in your root folder, it is in this folder that all your pages and related files and folders must live anything outside of this folder, above it so to speak is not granted public access and remains private.

In the public_html folder you can create a folder structure to suit your pages as chris has shown it's common to keep all script files in their own folder and likewise all image files in their own folder.

Ref: your last post; index.html is not a folder it will be a single file living in the public_html folder your other folders will be created in the same public_html folder any links in your index.html to say images would reference them thus: <img src="images/image.gif"> likewise for scripts.

Renata, I'm moving this thread to the 'Off Topic' section as this is not really a question that relates to the forum main topic, that of CSS coding,but feel free to keep asking questions om anything you don't understand, there are plenty of people who can help out here.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me