Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member Spirix's Avatar
    Join Date
    Apr 2006
    Posts
    1
    Member #
    13014
    Hey everyone,

    I was wondering if any of you could help me out with this problem. Well I designed a new website usings CSS and HTML in Dreamweaver MX8 and I would like to make it when a user goes to /whatever there is a page there that looks almost identical to the home page but just with different content. For example a tutorial site. Where the user clicks on the Tutorial tab and it brings them to http://www.mysite.com/templates
    What I have been trying to do is create a new folder and copy the index.htm into it. But all the images and CSS are no longer there. The only way it works is if I also copy and paste the CSS and the image folder into the /tutorials page. But that takes up a ton of extra space on my server.

    Can anyone help me solve the problem without having to duplicate the entire images and CSS file?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    Create a folder just for the images and .css file ...
    A directory structure like this:


    MAIN DIRECTORY
    =============
    index.html
    reference to .css file "./images/style_sheet.css"
    all references to images <img src="./images/image1.jpg">

    ALL OF YOUR IMAGES +CSS (directory is called "images")
    ==============
    style_sheet.css
    image1.jpg
    image2.jpg


    TEMPLATE 1
    ==============
    index.html
    reference to .css file "../images/style_sheet.css"
    all references to images <img src="../images/image1.jpg">

    TEMPLATE 2
    ==============
    index.html
    reference to .css file "../images/style_sheet.css"
    all references to images <img src="../images/image1.jpg">

    TEMPLATE 3
    ==============
    index.html
    reference to .css file "../images/style_sheet.css"
    all references to images <img src="../images/image1.jpg">


    Each directory you create references the images identically.

    ../images/ means to go back one directory, then ahead to "images".
    ./images/ means to stay in same directory, then ahead to "images".

    This is called "relative" path references. You specify the path
    relative to your current position. When you are in one of your
    TEMPLATE directories, you need to go back one directory, then
    ahead to "images" to find the image.


  4. #3
    Member
    Join Date
    Mar 2006
    Posts
    84
    Member #
    12765
    well said mlseim


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com