|
|
|
|
[VN
Boards Archive] |
Welcome to the Vault Network
forum archive.
This is not a complete archive, time didn't allot us the
opportunity to properly backup the majority of the boards
deemed "expendable". Most boards on this list have at least
20-40 pages archived (non-logged in pages, 15 topics per
page).
Popular boards may have as many as 250 pages archived at 50
topics per page, while others deemed of historical
signifigance may be archived in their entirety.
We may not agree with how the board shutdown was managed, but
we've done what we could to preserve some of its history in
lieu of that.
Please enjoy the archive.
~
Managers, Moderators, VIP's, and regular posters.
|
Author |
Topic: Web coding question
|
Dilutedx
Posts:
823
Registered:
Sep 7, '06
Extended Info (if available)
Real Post Cnt: 813
User ID: 1,169,725
|
Subject:
Web coding question
|
I have an IIS Server setup at home for internal testing on Windows Server 2003.
The default web site location is C:\Inetpub\wwwroot
I have an application I'm developing at home for work, I decided to take the site out of the root directory and put it in its own folder..so
C:\Inetpub\wwwroot\tapelog
Images are C:\Inetpub\wwwroot\tapelog\images
Includes are C:\Inetpub\wwwroot\tapelog\includes
All of my includes, databases, and CSS work on the site its the images in the CSS that are giving me issues.
I'm using the background:url("images/someimage.png"); or background:url("/images/someimage.png"); when I load the page and nothing shows...HOWEVER, if I Edit the CSS with the Web Developer toolbar in FF the images suddenly appear..as soon as I close that window they disappear. Keep in mind I dont have to make any changes in the Edit CSS window, I just need to open it. The images dont appear in IE7 either.
Do I need to reference the images as /tapelog/images/ or should (/)images/ work?
-----signature-----
(none)
|
Link to this post
|
Nevver
Title: VIP Non Sequitur
Posts:
20,815
Registered:
Apr 3, '02
Extended Info (if available)
Real Post Cnt: 20,509
User ID: 664,431
|
Subject:
Web coding question
|
Try using one of these: url("tapelog/images/someimage.png"); background:url("/tapelog/images/someimage.png"); Your web site, which is not in the root anymore, is located in a subdirectory called tapelog. So, if you don't include that directory in the url, the browser will look for the images directory in the root the way you have it pointing now. If that's not it, it sounds to me like it could be an issue with directory permissions rather than a coding problem. Make sure you have your images directory set with read permission (as an aside, turn off write and execute).
-----signature-----
Devil's Advocate.·´¯`·..·» "Nevver: Like the thing that hides in your closet. But worse." - Gueve
|
Link to this post
|
Dilutedx
Posts:
823
Registered:
Sep 7, '06
Extended Info (if available)
Real Post Cnt: 813
User ID: 1,169,725
|
Subject:
Web coding question
|
I'll try that, thanks..its just weird that the includes work using just includes/filename.css/js or whatever using a standard HTML include.
-----signature-----
(none)
|
Link to this post
|
Nevver
Title: VIP Non Sequitur
Posts:
20,815
Registered:
Apr 3, '02
Extended Info (if available)
Real Post Cnt: 20,509
User ID: 664,431
|
Subject:
Web coding question
|
If your JS and CSS files are in the same directory as the files calling them, then they don't need any extra directory information; it would work the same if you had the images in the same directory as well. I find the best method is to keep everything as simple as possible. If you do want to get more elaborate with your directory structure, then it's best to reference everything from the root by using a leading "/" in your reference: background:url("/tapelog/images/someimage.png"); If you go the other way, it's easy to get confused if you have include files in different directories outside of where your calling files are.
-----signature-----
Devil's Advocate.·´¯`·..·» "Nevver: Like the thing that hides in your closet. But worse." - Gueve
|
Link to this post
|
Dilutedx
Posts:
823
Registered:
Sep 7, '06
Extended Info (if available)
Real Post Cnt: 813
User ID: 1,169,725
|
Subject:
Web coding question
|
I'll have to remember that!
I was just assuming that tapelog would be the root directory for the other directories. I figured I could just reference the images as /images and it would check the tapelog directory since that folder resides in the tapelog directory.
-----signature-----
(none)
|
Link to this post
|
Wolfpaw_We
Title: WoW Vault Staff
Posts:
14,203
Registered:
Mar 22, '01
Extended Info (if available)
Real Post Cnt: 13,901
User ID: 77,927
|
Subject:
Web coding question
|
Your pages are still running under the default website. If you want to create a new root for them, you have to create a new application for the folder you want the site to be in. You can then reference to the subfolders through root. E.g. when you create a new application for c:\inetpub\wwroot\tapelog, you can then reference c:\inetpub\wwroot\tapelog\images with just /images in your html. You are unable to reference anything outside the c:\inetpub\wwroot\tapelog folder, however.
-----signature-----
(none)
|
Link to this post
|
|
|
© 2012. All
Rights Reserved. |
|
|
|
|