I'm trying to put some text on my slideshow and have the size of the font be responsive. I found this question:
How to create responsive text on top of an image?
which is pretty similar to what I'm trying to accomplish. I've been working at it and utilizing the font-size and line height percentages but it doesn't seem to be doing anything. So far my code looks like this:
HTML:
<div>
<div>
<div class="ec_slideshow">
<ul class="bxslider"> <!--slideshow that I found on the interwebz-->
<li><div class="ec_slidecontainer">
<img src="http://enviroptics.com/Matt/Transparent%20photos%20in%20progress/Vision_System_Flow_Cell_1200x400.png" alt=""/>
<!--This is the text that I want to be responsive-->
<h2 class="ec_slidecontent"><span>Bubble Analysis<br/>Possible Subtext</span></h2>
<!--End of text that I want to be responsive-->
</div></li>
</ul>
CSS:
.ec_slideshow {
width: auto;
max-width: 1200px;
height: auto;
border: 2px solid black;
/*background-color: cyan;*/
text-align: center;
font-size: 20px;
margin: 20px auto 0px auto;
padding-bottom: 0px;
z-index: 1 !important;
}
.ec_slidecontent span {
position: absolute !important;
top: 0px;
left: 30%;
font-family: 'roboto' !important;
font-size: 100% !important;
color: #fff !important;
padding: 3px 10px !important;
width: 40% !important;
line-height: 100% !important;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.7);
}
.ec_slidecontent {
margin: 0px !important;
padding: 0px !important;
.ec_slidecontainer img {
position: relative;
width: 100%; /* for IE 6 */
}
There are other HTML elements and css and js stuff going on in this page so maybe something font related is being inherited from somewhere else, or maybe I just have no idea what I'm doing. Either way, it may just be easiest to look at this page http://www.enviroptics.com/envirocam.html and resize the window to see what's going on.