gayathiribala
03-02-2012, 04:39 AM
Hi All,
I am facing problem, while placing images in fluid layout. I have tried with 'max-width' CSS property, but failed.
The image size remains same, when i resize the window or change the resolution. It exceeds my alloted space and overlaps with another div. I am currently working on 1920x1080 resolution.
My code below,
HTML:
<div id="maindiv">
<div id="leftdiv">
</div> <!-- End of leftdiv -->
<div id="middlediv">
<div id="headerdiv">
<table>
<tr>
<td>
<img id="headerlogo" src="./images/Logo_TeaKadai.png" alt="Tea Kadai"/>
</td>
<td> <!-- navigation menu comes here -->
</td>
</tr>
</table>
</div> <!-- End of headerdiv -->
<div id="contentdiv">
main content
</div> <!-- End of maincontent -->
<div id="footerdiv">
footer content
</div> <!-- End of footerdiv -->
</div> <!-- End of middlediv -->
<div id="rightdiv">
</div> <!-- End of rightdiv -->
* *</div> * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * <!-- End of maindiv --> *
CSS:
div #maindiv
{
font-family:Georgia;
font-size:14px;
}
div #leftdiv
{
float:left;
width:19.95%;
background-image:url('../images/Image06.jpg');
background-repeat:repeat;
height:100%;
}
div #middlediv
{
float:left;
width:60%;
height:100%;
}
div #rightdiv
{
float:left;
background-image:url('../images/Image06.jpg');
background-repeat:repeat;
width:19.95%;
height:100%;
}
div #headerdiv
{
height:10%;
}
div #contentdiv
{
background-color: #222;
height:80%;
}
div #footerdiv
{
background-color: #555;
height:10%;
}
#headerlogo
{
max-width:60%;
}
Kindly help me to solve this.
I am facing problem, while placing images in fluid layout. I have tried with 'max-width' CSS property, but failed.
The image size remains same, when i resize the window or change the resolution. It exceeds my alloted space and overlaps with another div. I am currently working on 1920x1080 resolution.
My code below,
HTML:
<div id="maindiv">
<div id="leftdiv">
</div> <!-- End of leftdiv -->
<div id="middlediv">
<div id="headerdiv">
<table>
<tr>
<td>
<img id="headerlogo" src="./images/Logo_TeaKadai.png" alt="Tea Kadai"/>
</td>
<td> <!-- navigation menu comes here -->
</td>
</tr>
</table>
</div> <!-- End of headerdiv -->
<div id="contentdiv">
main content
</div> <!-- End of maincontent -->
<div id="footerdiv">
footer content
</div> <!-- End of footerdiv -->
</div> <!-- End of middlediv -->
<div id="rightdiv">
</div> <!-- End of rightdiv -->
* *</div> * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * <!-- End of maindiv --> *
CSS:
div #maindiv
{
font-family:Georgia;
font-size:14px;
}
div #leftdiv
{
float:left;
width:19.95%;
background-image:url('../images/Image06.jpg');
background-repeat:repeat;
height:100%;
}
div #middlediv
{
float:left;
width:60%;
height:100%;
}
div #rightdiv
{
float:left;
background-image:url('../images/Image06.jpg');
background-repeat:repeat;
width:19.95%;
height:100%;
}
div #headerdiv
{
height:10%;
}
div #contentdiv
{
background-color: #222;
height:80%;
}
div #footerdiv
{
background-color: #555;
height:10%;
}
#headerlogo
{
max-width:60%;
}
Kindly help me to solve this.