ID/style in variable doesn't work
Posted: Thu Jul 18, 2019 6:05 pm
I used it before in templates and it worked perfectly. Today I am not able to make the same again.
template.htm
stylesheet.css
content
There is no background loaded on the intro page nor on another pages. What am I missing?
template.htm
Code: Select all
<body id="body" class="<?php echo $body;?>" <?php echo onload();?>>
Code: Select all
#body{ /* general setting for body tag */
width: 100vw;
height: 100vh;
display: table-cell;
vertical-align: middle;
}
.intro{ /*setting for intro page only */
background: url(images/background.jpg) no-repeat center center fixed;
background-size: cover;
}
.page{ /* setting for all other pages */
width: 100vw;
height: 100vh;
display: table-cell;
vertical-align: middle;
background: none;
}
Code: Select all
<h1>intro</h1>
<div>#cmsimple $body='intro';#</div>
...
<h1>Page 11</h1>
#cmsimple $body='page';#