wkenny
09-14-2011, 10:54 PM
I have the following:
HTML
<div class="content">
<div class="textbg">
<img src="bg400x400.jpg" width="600px" height="990px">
<div class="textinbox">
<!-- text goes here -->
and the CSS
.content
{
float: left;
width: 60%;
padding-left: 0.5%;
}
.textbg {
position: relative;
width: 100%;
padding-left:10px;
}
.textinbox {
position: absolute;
top: 20px;
left: 20;
width: 90%;
padding-left:30px;
padding-top:10px;
}
If I zoom in or out, the text overflows the image container. How can I force the text to always stay inside the image div?
HTML
<div class="content">
<div class="textbg">
<img src="bg400x400.jpg" width="600px" height="990px">
<div class="textinbox">
<!-- text goes here -->
and the CSS
.content
{
float: left;
width: 60%;
padding-left: 0.5%;
}
.textbg {
position: relative;
width: 100%;
padding-left:10px;
}
.textinbox {
position: absolute;
top: 20px;
left: 20;
width: 90%;
padding-left:30px;
padding-top:10px;
}
If I zoom in or out, the text overflows the image container. How can I force the text to always stay inside the image div?