Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Includes, on Server = OK, but in DWMX2k4 = bad

Status
Not open for further replies.

slakker

MIS
Jun 5, 2003
59
0
0
US
Hello all.. I'd like some help or suggestions on this please..

I built my site, broke it down into Header/Footer includes, and put them in the folder on my server. I'm working on a file that's saved in.. included my header.inc.asp and footer.inc.asp. The problem is with my CSS Stylesheet.. it's saved in It's properly linked to within the header, <link href="../scripts/styles.css" rel="stylesheet" type="text/css">, but when I'm working on my INDEX.ASP project file, I can't apply any styles, because it can't figure out where the CSS sheet is.. in the Design applet, it has styles.css as a filename, but I don't actually see any of my stiles.. although everything works fine when uploaded to server.

I'm sure you guys have run into this problem before as well... I know I have, many times.. but this time I need it to work just like building a regular page, without includes, because I will hang the page off to some other people later, that will be editing it..

I'm sorry if I made this too confusing.. let me know if I can clear something up.
Any suggestions would be very much appreciated. Thanks! :)
 
Try changing your link to top down. ie:

Code:
<link rel="stylesheet" type="text/css" href="/scripts/style.css">

But ultimately it is better to keep your entire project in 1 web folder. I would recommend placing the stylesheet in the folder.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
the true issue is inthe path:
<link href="../scripts/styles.css">
placing dots ../script/ before the path:
1 dot- one level UP from current location/page
2 dots......respectivly

relative vs. absolute.....it is mainly for control of structure in you development enivironment vs. production server where folder structure does not have to be the same as on the test server...basically it saves u the trouble of editing files.
HTH



> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top