|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there
This is my first post so if any more info is needed then just ask and sorry. I have created an ASP login page which works fine when viewed through my localhost. The trouble I have is that I then add CSS to that page and the CSS won't show. The page looks nice and styled when viewed in Dreamweaver, but the ASP page viewed through the localhost is completely unformatted. So, the ASP is working, the CSS is working. The CSS just won't show when viewing an ASP page through the localhost. I am pretty sure it means there is a problem with the IIS setup but I have no idea what. I don't know if this is related or helps pin down the problem but I created an Ad-rotator also which reads text and images from a txt file. The text from the file shows and rotates OK, but the images are broken, I just get red X's. The links to the images are OK. Help al |
|
#2
|
|||
|
|||
|
Sounds like you have some broken links in your code. Look in your browser source & see if you are trying to get the .css file and the images from the right place.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Hi There, thanks for your reply, and I know I said I am new here, I am not new to web design. All my links are OK, was the first thing I made sure was OK(1st rule - is it plugged in?).
As I mentioned, the CSS and images work when not viewed on an ASP page, it's just when they are incorporated into ASP and viewed on my local IIS that they don't work. When uploaded to an external site they work, so it is an issue on my pc somewhere, I think to do with IIS. I have been doing wepages for years and I've never come across this issue. Does anyone know if this could be to do with IIS? Thanks al |
|
#4
|
|||
|
|||
|
IIS doesn't mangle links
Is the url to your .css file correct in the browser source in one of the pages that doesn't work? By the time the browser is trying to get the css page or any image links, asp is out of the picture and you're working with html and web browsers. asp pages must be served up through IIS, you can't navigate directly to an asp page and open it off your disk. |
|
#5
|
|||
|
|||
|
Hi again and thanks
Yep the output from the asp page points to the right place: <link href="css/pages.css" rel="stylesheet" type="text/css"> The asp elements in the page work a treat, but it is completely bereft of styling. The ASP page when viewed in Dreamweavers preview shows the styling. Technically both elements are working as you'd expect, but just not together. I just don't get it! AAAARGH! |
|
#6
|
|||
|
|||
|
AHA, i just got it working using an absolute link didn't try that as i don't want to use it and there was no reason(i don't think) for the relative link to work.
Why won't it display using a relative position??? cos this:<link href="C:\Inetpub\wwwroot\admin\css\pages.css" rel="stylesheet" type="text/css"> isn't what you want. Thanks for your help Doug ) but have i just been really dense or should a relative link work??? |
|
#7
|
||||
|
||||
|
It would depend on if the css file was actually in the root of the site...
did you try this? Code:
<link href="/css/pages.css" rel="stylesheet" type="text/css"> It looks in the root of the site, then in a subfolder call css for the pages.css file. |
|
#8
|
|||
|
|||
|
Hi Memnoch ta for reply
I tried as you suggested, it looks groovy in Dreamweaver but when I actually view it the styling is gone. I have read something about W3C saying absolute links should be used when using http, which my page will be as i am viewing it through localhost. But why can't it do relative?? grrr al |
|
#9
|
|||
|
|||
|
Maybe it's a dreamweaver thing, a program I don't know. Does the preview use the webserver to generate the preview pages, or does Dreamweaver use it's own internal server to show the preview?
There are no problems using relative links with IIS assuming your virtual directory is set up properly. |
|
#10
|
|||
|
|||
|
thanks again Doug
I have it working with relative links now. I can''t believe I forgot this! Was this: <link href="css/pages.css" rel="stylesheet" type="text/css"> Now this: <link href="css\pages.css" rel="stylesheet" type="text/css"> Works a treat! Am sure I tried this but there you go. feel a bit foolish now ![]() Dreamweaver is a top program! The preview is from within Dreamweaver but can be set to use the localhost to test asp. Thanks again for your help. You made me attack it in all the right ways. |
|
#11
|
|||
|
|||
|
I'm happy to hear you got it sorted out. Someday I'll give dreamweaver a try I suppose.
![]() |
|
#12
|
||||
|
||||
|
Dreamweaver and relative links
You have to be careful in Dreamweaver when creating links to internal files. It gives you the option of making a link "document" or "site root" relative. It can make a HUGE difference. I always try to make links Document relative.
|
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > No CSS on ASP page - possible IIS problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|