Another Simple Problem from a Noobie |
Another Simple Problem from a Noobie |
TW Allen |
May 4 2021, 04:54 PM
Post
#1
|
Member Group: Members Posts: 42 Joined: 12-April 21 Member No.: 27,890 |
See: allendesigns.com/index.html
and: allendesigns.com/Projects/20325/20325.html All of my pages (so far) have the same code at the top down to the <hr>. In the "old days" (FP), I would use a frame. But now, I just copy the code. It always works except for now in 20325.html. I've put it through the error checking. It does not seem to read allen.css. Note: at one time it worked, but not now. The changes I made should not have affected it, but maybe a fresh pair of eyes can spot it. Thank you |
pandy |
May 4 2021, 05:02 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
You mean the CSS doesn't take (again)? Cause I see the HTML.
That's because of the relative URL you use in the LINK tag. It's relative to the page it's in, so the browser looks for http://allendesigns.com/Projects/20325/allen.css and there is no such file. If you want to copy the same markup into all pages without editing it you can either use a full url (the whole http://... shebang) or a root relative URL. That begins with a slash that replaces everything up to and including the domain name. CODE /allen.css https://htmlhelp.com/faq/html/basics.html#relative-url |
TW Allen |
May 4 2021, 05:16 PM
Post
#3
|
Member Group: Members Posts: 42 Joined: 12-April 21 Member No.: 27,890 |
You mean the CSS doesn't take (again)? Cause I see the HTML. That's because of the relative URL you use in the LINK tag. It's relative to the page it's in, so the browser looks for http://allendesigns.com/Projects/20325/allen.css and there is no such file. If you want to copy the same markup into all pages without editing it you can either use a full url (the whole http://... shebang) or a root relative URL. That begins with a slash that replaces everything up to and including the domain name. CODE /allen.css https://htmlhelp.com/faq/html/basics.html#relative-url Thank you, Pandy. That fixed it. Since all my projects are going to be at the same level, I put in ../../allen.css. Maybe I will get this stuff some day. But I'm working on it just about every day, trying to stay away from DW, just using code. In doing this, the pages are loading MUCH faster than they did before and are now readable on a phone screen. |
pandy |
May 4 2021, 05:22 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
Yes, that would also work. The advantage of /allen.css is that it's also good for pages that are not in a sub directory of projects. And it's shorter. Disadvantage is that it doesn't work if you want to view your stuff locally.
|
Lo-Fi Version | Time is now: 26th April 2024 - 12:00 PM |