Discussion:
Template linking problem
(too old to reply)
YeonAh
2010-03-31 16:34:07 UTC
Permalink
Hi, I'm in the middle of redoing my personal website and I've linked
all the main pages to a template file. Everything displays correctly
in Dreamweaver, but when I preview any of the pages on an internet
browser (Firefox, Safari and Opera all show the same problem), the
template seems to have disappeared and my site reverts back to the
default styling.

Any idea what could have caused this? I suspect it's a linking
problem, that the page isn't reading the template correctly, but I've
already checked all the links and everything is linked correctly. And
the fact that it displays correctly in Dreamweaver is confusing me.

Please help me!
-YeonAh
Duncan Kennedy
2010-03-31 17:23:35 UTC
Permalink
In message
Post by YeonAh
Hi, I'm in the middle of redoing my personal website and I've linked
all the main pages to a template file. Everything displays correctly
in Dreamweaver, but when I preview any of the pages on an internet
browser (Firefox, Safari and Opera all show the same problem), the
template seems to have disappeared and my site reverts back to the
default styling.
Any idea what could have caused this? I suspect it's a linking
problem, that the page isn't reading the template correctly, but I've
already checked all the links and everything is linked correctly. And
the fact that it displays correctly in Dreamweaver is confusing me.
It may be a silly question but did you make the template first then
build each page from it? That *should work.
--
Duncan K
Downtown Dalgety Bay
YeonAh
2010-03-31 18:25:22 UTC
Permalink
Post by Duncan Kennedy
In message
all the main pages to a template file.  Everything displays correctly
in Dreamweaver, but when I preview any of the pages on an internet
browser (Firefox, Safari and Opera all show the same problem), the
template seems to have disappeared and my site reverts back to the
default styling.
Any idea what could have caused this?  I suspect it's a linking
problem, that the page isn't reading the template correctly, but I've
already checked all the links and everything is linked correctly.  And
the fact that it displays correctly in Dreamweaver is confusing me.
It may be a silly question but did you make the template first then
build each page from it?  That *should work.
--
Duncan K
Downtown Dalgety Bay
The index page was created before the template, and the template added
to the page after I was done fixing it up...but all the other pages in
the site were created after and I just went to Modify -> Templates ->
Apply Template to Page.

Is there another way to attach a template to the pages that might
prove more effective?

Thank you!
YeonAh
2010-03-31 18:34:30 UTC
Permalink
Post by YeonAh
Post by Duncan Kennedy
In message
all the main pages to a template file.  Everything displays correctly
in Dreamweaver, but when I preview any of the pages on an internet
browser (Firefox, Safari and Opera all show the same problem), the
template seems to have disappeared and my site reverts back to the
default styling.
Any idea what could have caused this?  I suspect it's a linking
problem, that the page isn't reading the template correctly, but I've
already checked all the links and everything is linked correctly.  And
the fact that it displays correctly in Dreamweaver is confusing me.
It may be a silly question but did you make the template first then
build each page from it?  That *should work.
--
Duncan K
Downtown Dalgety Bay
The index page was created before the template, and the template added
to the page after I was done fixing it up...but all the other pages in
the site were created after and I just went to Modify -> Templates ->
Apply Template to Page.
Is there another way to attach a template to the pages that might
prove more effective?
Thank you!
I also just tried building a new page from the template by going New -
Post by YeonAh
New from template, and it yielded the same result.
Duncan Kennedy
2010-03-31 21:06:33 UTC
Permalink
In message
Post by YeonAh
Post by YeonAh
Post by Duncan Kennedy
In message
personal website and I've linked
all the main pages to a template file.  Everything displays correctly
in Dreamweaver, but when I preview any of the pages on an internet
browser (Firefox, Safari and Opera all show the same problem), the
template seems to have disappeared and my site reverts back to the
default styling.
Any idea what could have caused this?  I suspect it's a linking
problem, that the page isn't reading the template correctly, but I've
already checked all the links and everything is linked correctly.  And
the fact that it displays correctly in Dreamweaver is confusing me.
It may be a silly question but did you make the template first then
build each page from it?  That *should work.
--
Duncan K
Downtown Dalgety Bay
The index page was created before the template, and the template added
to the page after I was done fixing it up...but all the other pages in
the site were created after and I just went to Modify -> Templates ->
Apply Template to Page.
Is there another way to attach a template to the pages that might
prove more effective?
Thank you!
I also just tried building a new page from the template by going New -
Post by YeonAh
New from template, and it yielded the same result.
That seems Ok so there is something else going wrong.

Can you describe the differences - even in general terms?
--
Duncan K
Downtown Dalgety Bay
YeonAh
2010-03-31 22:17:34 UTC
Permalink
Well...I showed my Dreamweaver teacher (I'm a student) and even he was
stumped, though we managed to narrow it down to the fact that, for
some reason, the external stylesheet isn't being read. I attached the
same style sheet to a complete separate page without a template, and
the same problem came up.

I looked through all the coding for the stylesheet and I have no clue
what could be wrong.

Here's the code on the page for the stylesheet:
<link href="/style.css" rel="stylesheet" type="text/css" />
It's in the <head> section of the coding, so that part's okay...


Here's the coding for the stylesheet itself:

body {
background-color: #000000;
background-image: url(/assets/images/Moon_Background.jpg);
background-repeat: no-repeat;
background-attachment:fixed;
text-align: justify;
}
body,td,th {
font-family: "Century Gothic", "Abadi MT Condensed Light", "Arial
Narrow", Arial, sans-serif;
font-size: 10px;
}
a:link {
color: #0A3560;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0A3560;
}
a:hover {
text-decoration: underline;
color: #3366FF;
}

a:active {
text-decoration: none;
color: #0A3560;
}
.bottomcopyright {
color: #FFFFFF;
padding-right: 90px;
}
.linktext {
font-size: 14px;
text-transform: uppercase;
color: #FFFFFF;
text-align: center;
vertical-align: top;
padding-top: 15px;
}
#main_container {
background-repeat: no-repeat;
position:absolute;
width:507px;
z-index:1;
left: 483px;
top: 76px;
background-attachment: fixed;
background-position: left;
}
#apDiv1 {
position:absolute;
z-index:2;
left: 215px;
top: 437px;
}
h1 {
font-family: "Century Gothic", "Abadi MT Condensed Light", "Arial
Narrow", Arial, sans-serif;
font-size: 24px;
color: #FFFFFF;
font-weight: normal;
text-transform: uppercase;
padding-right: 20px;
float: none;
text-align: center;
padding-bottom: 15px;
}
.maintable {
padding-right: 25px;
padding-left: 25px;
text-align: justify;
}
h2 {
font-family: "Century Gothic", "Abadi MT Condensed Light", "Arial
Narrow", Arial, sans-serif;
font-size: 14px;
text-transform: uppercase;
color: #FFFFFF;
font-weight: lighter;
letter-spacing: 5px;
padding-left: 15px;
}
h3 {
font-family: "Century Gothic", "Abadi MT Condensed Light", "Arial
Narrow", Arial, sans-serif;
font-weight: lighter;
text-transform: uppercase;
color: #FFFFFF;
padding-left: 15px;
letter-spacing: 8px;
}
.quotes {
font-style: italic;
color: #FFFFFF;
padding-left: 15px;
}

All of it was created within Dreamweaver, and as said before, displays
perfectly fine inside the Dreamweaver 'Design' window. When
transferring it to a browser window however, it ignores the stylesheet
altogether.

I don't believe it's a problem with the coding, as it does display
fine in Dreamweaver...what do you think? I'm stumped.
Duncan Kennedy
2010-04-01 11:10:48 UTC
Permalink
In message
Post by YeonAh
Well...I showed my Dreamweaver teacher (I'm a student) and even he was
stumped, though we managed to narrow it down to the fact that, for
some reason, the external stylesheet isn't being read. I attached the
same style sheet to a complete separate page without a template, and
the same problem came up.
I looked through all the coding for the stylesheet and I have no clue
what could be wrong.
<link href="/style.css" rel="stylesheet" type="text/css" />
It's in the <head> section of the coding, so that part's okay...
[snip of CSS code}
Post by YeonAh
}
All of it was created within Dreamweaver, and as said before, displays
perfectly fine inside the Dreamweaver 'Design' window. When
transferring it to a browser window however, it ignores the stylesheet
altogether.
I don't believe it's a problem with the coding, as it does display
fine in Dreamweaver...what do you think? I'm stumped.
I can't see anything wrong with your style sheet - perhaps somebody else
can.

But - Dreamweaver tends to put its templates in a Templates folder - at
least mine does. Then, in may case, the actual pages are mostly in the
root - so the link to the CSS is wrong unless it is changed. Have you
checked the actual reference to the CSS file on your main pages? Could
it be looking in the wrong place?

Your code shows: <link href="/style.css" . . . . . . . If the rest
of your pages are not in the same directory as your template this is
probably looking in a different location.

(OK I'm probably pushing it a bit with my over simplistic suggestions
but I've missed things like that before and the complex stuff you are
using looks fine to me.)
--
Duncan K
Downtown Dalgety Bay
YeonAh
2010-04-01 16:53:53 UTC
Permalink
Post by Duncan Kennedy
In message
I can't see anything wrong with your style sheet - perhaps somebody else
can.
But - Dreamweaver tends to put its templates in a Templates folder - at
least mine does.  Then, in may case, the actual pages are mostly in the
root - so the link to the CSS is wrong unless it is changed.  Have you
checked the actual reference to the CSS file on your main pages?  Could
it be looking in the wrong place?
Your code shows:  <link href="/style.css" . . . . . . .    If the rest
of your pages are not in the same directory as your template this is
probably looking in a different location.
(OK I'm probably pushing it a bit with my over simplistic suggestions
but I've missed things like that before and the complex stuff  you are
using looks fine to me.)
--
Duncan K
Downtown Dalgety Bay
I just did as you suggested and checked all the links...they all are
linking to the right places. The style sheet is in the root folder
just as the pages are. The template IS in a separate folder, but I
just tried moving it out and relinking everything and it doesn't make
a difference.

If the link was wrong, wouldn't Dreamweaver pick up on it and display
it incorrectly in the Design view? Everything's alright there, it's
just the browser...

I might just try redoing the stylesheet from scratch...something must
have gone wrong while creating it.

Thank you for your help!

Loading...