This is so simple with graphics. I have an 'external' CSS file that simply lists the graphics for two different positions on each web page. Each page's containers are individually numbered (i.e., ID=upper6, lower6, upper7 and so forth). The external CSS file (imageref.css) merely has a list: #upper6 {background:url(path to graphic) no-repeat;)
etc.
These load just fine.
Why can't I do this with blocks of text (i.e., #uppercaption6, #lowercaption6). I've tried every permutation I can think of (backgrounds, etc.).
I'd like to do the same to populate audio clips on each page. Do I have to learn jQuery? Help a rank beginner out here will ya?
Per request, I've expanded my dilemma thusly:
On the page/s in question, I initially load the CSS, and a text file like this:
<link rel="stylesheet" type="text/css" href="../includes/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="../includes/imageref.css" />
The second file could just be text, as it is formatted like this:
#upper6 {background:url(../images/phone.png) no-repeat right 0px;}
#lower6 {background:url(../images/writing_utensils.png) no-repeat right 0px;}
. . .
The image links listed there are called from this point in the HTML:
<figure id="photo_1"><a href="javascript:" onclick="upvis();" >
<div class="figure_photo" id="upper6"></div></a></figure>
and all web pages work just fine.
Question: How can I do the same thing with video clips and blocks of text?
These areas have the same type of lists, but do NOT work.
<video class="video-container" preload="none" controls>
<source class="vid_mp4" id="vid01" />
</video>
or,
<div class="CC_container">
<div class="closed_caption" id="caption1" ></div>
</div>
I'm confused that I can easily call in graphics and photos by referencing their "ID", but not video clips or blocks of text.