I'm not sure if this is even possible but if it is I imagine it would be via PHP (which I am a total beginner at).
Basically I have an .html file with an empty DIV tag in it and I am hoping to get the content of that DIV tag, which is stored in a .php file, and put it into the DIV.
To try and make this a bit clearer...
HTML FILE
<div id="content">
</div>
and...
CSS
#content {
position:relative;
width:700px;
max-height:550px;
min-height:10px;
overflow:auto;
}
#content h1 {
font-family:"Kristen ITC";
font-size:20px;
font-weight:bold;
margin-top:20px;
margin-bottom:0px;
margin-left:70px;
text-align:left;
color:#000000;
text-decoration:underline;
}
#content p {
font-family:"Bradley Hand ITC";
font-size:22px;
font-weight:bold;
margin-top:0px;
margin-bottom:0px;
margin-left:90px;
margin-right:130px;
text-align:left;
color:#000000;
text-decoration:none;
}
And then, I am hoping to have this...
<h1>- Chapter 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus molestie orci at orci blandit consectetur dapibus elit sollicitudin. Donec diam libero, feugiat vitae egestas eget, pellentesque eget tellus.</p>
<h1>- Chapter 2</h1>
<p>Phasellus in libero at ligula tincidunt convallis et a libero. Ut elementum molestie enim, vitae consequat mi imperdiet in. Ut metus justo, pharetra vel convallis et, eleifend vitae est. Aenean fringilla tincidunt nunc ac gravida.</p>
In a .php file, which I will then link to within the .html file, like this...
HTML FILE
<div id="content">
(Somehow link the .php. file here to get the <h1> and <p> stuff)
</div>
I hope this makes sense.
I have currently tried (remember I'm a beginner so don't laugh if I'm just being stupid)...
HTML FILE
<div id="content">
$contents = file_get_contents('current.php');
</div>
with the php file being...
PHP FILE
<?php
// print output
<h1>- Chapter 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus molestie orci at orci blandit consectetur dapibus elit sollicitudin. Donec diam libero, feugiat vitae egestas eget, pellentesque eget tellus.</p>
<h1>- Chapter 2</h1>
<p>Phasellus in libero at ligula tincidunt convallis et a libero. Ut elementum molestie enim, vitae consequat mi imperdiet in. Ut metus justo, pharetra vel convallis et, eleifend vitae est. Aenean fringilla tincidunt nunc ac gravida.</p>
?>
I have no idea what I'm doing, whether I'm relatively close to making this work, completely miles away from achieving it or if it's even possible.
In a perfect world where I could just use the .html file and .css file, it would look like this example I made on jsfiddle
Can anyone help me with this?