I am having trouble adjusting the width of a divtag when i resize my browser window. There are 2 images that i have floated on the div tag, one on the left and one on the right. When i minimize the browser the div size is reduced and the right image comes to the second line.
This is my master page
<div id="mainContainer">
<div id="header" >
<asp:Image CssClass="p3Logo" ID="p3Logo" runat="server" AlternateText="P3" ImageUrl="~/images/site_wrapper/p3_logo.gif" />
<asp:Image CssClass="headerRight" ID="imgHeaderRight" runat="server" AlternateText="Right Header Image" ImageUrl="~/images/site_wrapper/header_right.jpg" />
</div>
and this is the css that i am using.
/*
CSS-file for Strictly CSS three column layout 2006
http://www.strictlycss.com
Developed by Eivind Savio
*/
* /*Set's border, padding and margin to 0 for all values*/
{
padding: 0;
margin: 0;
}
body, html {
color: #666666;
font-family: Arial, Tahoma, sans-serif;
height: 100%;
background: url(../images/site_wrapper/left_column_bg.gif) 0 100px repeat-y #fff; /*** This is the left column background "faked" with an image. You can also position the image using left top repeat-y. The 100px is added to have control of where the vertically repeating starts. The background color #fff (white) will be the background color for our content area ***/
}
body {
font-size: 9pt;
min-width: 760px; /* Don't work in IE */
}
.clear
{
clear: both;
}
#mainContainer {
min-height: 100%;
/*background: url(../images/site_wrapper/left_column_bg.gif) 100% 100px repeat-y; /*** This is the right column background "faked" with an image. The 100px is added to have control of where the vertically repeating starts. ***/
}
* html #mainContainer {
height: 100%; /*** IE doesn't support min-height, but instead it handles height as min-height so we need to hack the height ***/
}
/**************************
HEADER
**************************/
#header {
height: 68px;
background-color: #5B7D96;
width: 100%;
}
/**************************
CONTENT AND COLUMNS
**************************/
.outer {
padding-left: 208px; /*** Same width as margin-left for the float-wrap div ***/
padding-right: 0px; /*** Our right column width ***/
}
.inner {
width: 100%;
padding-bottom: 45px; /*** Padding-bottom value is the same value as the total height of the footer ***/
}
/*** div.inner is wider than its container, div.outer, and so overlaps to the right, pushing
div.right into the proper position. IE expands div.outer instead, requiring a Tan hack to avoid
blowing the layout apart. IE gets the original 100% width as in the Livingstone layout.
***/
.float-wrap {
float: left;
width: 100%;
margin-left: -208px; /*** Same length as .outer padding-left but with negative value ***/
}
#content {
float: right;
margin-right: -208px; /*** Same length as .outer padding-left but with negative value ***/
width: 100%;
position: relative; /*** IE needs this ***/
}
.contentWrap{
padding: 0px;
}
/**************************
LEFT COLUMN
**************************/
/*** div.left is in div.float-wrap, and when div.float-wrap is neg margined to the left,
div.left is carried over into the proper position.
***/
#left {
float: left;
width: 183px;
padding: 10px 15px 10px 10px;
position: relative; /*** IE needs this ***/
overflow: hidden;
}
/*************************
RIGHT COLUMN
**************************/
#right {
float: right;
width: 0px;
padding: 0px;
position: relative; /*** IE needs this ***/
margin-right: -0px; /** This negative margin-right value is the same as the right column width (width + padding). ***/
position: relative; /*** IE needs this ***/
}
/**************************
FOOTER
**************************/
#footer {
height: 0px; /*** The drawback with this solution is that the height of the footer can't have a flexible height. If you add so much content to the footer that it extends 45px, you will get a vertical scrollbar and the content will overflow the footer if you don't set overflow to hidden ***/
margin-top: -0px; /*** By using a negative margin-top we now moves the footer up the same amount as the footer height to avoid vertical scrolling. Remember, if you use borders and padding on your footer you will have to calculate this in your negative margin-top value also. ***/
text-align: center;
color: #FFFFFF;
background: #5B7D96;
}
#footer p {
clear: both;
}
/**************************
SITE ELEMENTS
**************************/
a
{
color: #EF3C23;
text-decoration: none;
}
a[href]:hover
{
text-decoration: underline;
}
a:visited
{
color: #EF3C23;
}
p
{
margin: 10px 0px 10px 0px;
}
.p3Logo
{
width: 342px;
height: 68px;
float: left;
}
.headerRight
{
width: 460px;
height: 68px;
float: right;
}
input
{
padding: 2px;
font-size: 11px;
border: solid 1px #5B7D96;
}
.primaryBreadcrumb
{
background-image: url(../images/site_wrapper/primary_breadcrumb_bg.gif);
height: 20px;
width: 100%;
color: #FFFFFF;
}
.breadcrumbText
{
margin: 1px 5px 0px 5px;
text-decoration: none;
}
.breadcrumbText a
{
color: #FFFFFF;
}
.breadcrumbText a:visited
{
color: #FFFFFF;
}
.loginLabel
{
color: #666666;
font-size: 12px;
font-weight: bold;
}
.loginButton
{
margin-left: -5px;
}
.customerLogo
{
max-width: 180px;
max-height: 200px;
}
.customerName
{
color: #5B7D96;
font-weight: bold;
}
.userInfo
{
color: #FFFFFF;
}
.peopleBannerContainer
{
width: auto;
overflow: hidden;
background-image: url(../images/site_wrapper/people_banner_bg.gif);
background-repeat: repeat-x;
}
.peopleBanner
{
width: auto;
height: 117px;
overflow: hidden;
background-image: url(../images/site_wrapper/people_banner.jpg);
background-repeat: no-repeat;
}
.contentHeader
{
padding: 0px 10px 0px 10px;
}
#contentArea
{
padding: 0px 15px 0px 15px;
}
#contentArea ul, #contentArea li
{
list-style-type: disc;
margin: 0 1.12em ;
}
.homeAnimContainer
{
margin-left: 100px;
margin-top: 0px;
}
.contentTitle
{
display: block;
font-size: 15pt;
font-weight: bold;
color: #848684;
margin: 20px 0px 20px 0px;
}
.contentSubTitle, .sectionHeader
{
display: block;
font-size: 11pt;
font-weight: bold;
color: #848684;
margin: 15px 0px 15px 0px;
}
tr.sectionHeader
{
display: table-row;
}
tr.sectionHeader th, table tr.sectionHeader td
{
padding: 5px;
}
.subTitle
{
display: block;
font-size: 11pt;
font-weight: bold;
}
.helpHintsTitle
{
font-weight: bold;
}
.relatedInformationContainer
{
background-color: #FFFFFF;
width: 684px;
height: auto;
border: 1px solid #CACCCE;
color: #666666;
padding: 8px;
margin-bottom: 10px;
}
.selectedInformation
{
font-size: 11pt;
font-weight: bold;
color: #848684;
margin: px 0px 5px 0px;
}
.selectedInformationSmall
{
font-size: 10pt;
font-weight: bold ! important;
color: #848684;
margin: px 0px 5px 0px;
}
.relatedInformation
{
background-color: #FFFFFF;
height: auto;
font-family: Arial;
font-size: 12px;
color: #364d87;
}
.welcomeContentContainer
{
min-width: 750px;
width: expression(document.body.clientWidth < 1005 ? "800px" : "100%");
height: 100%;
overflow: hidden;
background-image: url(../images/welcome_bg.jpg);
background-repeat: repeat-x;
}
.idpHeader
{
padding: 5px;
background: #5b7d96;
color: #FFFFFF;
font-size: 11pt;
font-weight: bold;
}
.competencyLabel
{
padding: 0px 8px 0px 8px;
color: #476982;
cursor: pointer;
font-weight: bold;
text-decoration: none;
h: expression(onmouseover=new Function("this.style['textDecoration'] = 'underline';"),
onmouseout=new Function("this.style['textDecoration'] = 'none';"));
}
.competencyLabel:hover
{
text-decoration: underline;
}
.competencyExpander
{
float: left;
vertical-align: middle;
cursor: pointer;
margin-right: 8px;
}
.developmentResourcesHeader
{
background: #9ea2a6;
color: #FFFFFF;
font-size: 10pt;
font-weight: bold;
padding: 5px;
}
.developmentResource
{
background: #EBEBEB;
border-bottom: 0px;
border-right: 0px;
border-bottom: 0px;
border-top: solid 1px #FFFFFF;
padding: 5px;
}
.developmentMode
{
background: #D8D9DB;
padding: 5px;
text-align: center;
border-top: solid 1px #FFFFFF;
}
.idpSkillArrow
{
margin-top: 5px;
}
.button
{
margin: 1px 1px 1px 1px;
}
.mainContentWithRightBox
{
margin: 0px 225px 0px 0px;
}
.rightContentBox
{
float: right;
width: 225px;
margin-left: 20px;
}
hr.rightContentBoxDivider
{
height: 1px;
border: 0px;
border-top: solid 1px #FFFFFF;
color: #FFFFFF;
background-color: #FFFFFF;
}
.rightContentBoxLight
{
padding: 10px;
color: #5B7D96;
background: #e1ebf2;
}
.rightContentBoxLinkContainer a
{
display: block;
border-top: solid 1px #FFFFFF;
padding: 8px 10px 8px 10px;
background: #e1ebf2;
}
.rightContentBoxLinkContainer
{
padding: 10px 0px 0px 0px;
background: #e1ebf2;
}
.rightContentBoxDark
{
padding: 10px;
color: #FFFFFF;
background: #5B7D96;
}
.rightContentBoxFooter
{
width: 225px;
height: 80px;
background: #e1ebf2;
}
#promotabilityLeft
{
float: left;
clear: left;
width: 375px;
}
#promotabilityRight
{
float: right;
clear: right;
width: 305px;
}
.nineBoxContainer
{
height: 313px;
width: 313px;
background-image: url(../images/9box.gif);
background-repeat: no-repeat;
padding: 50px 50px 1px 1px;
}
.nineBoxTable
{
background: none;
}
.nineBoxCell
{
width: 103px;
cursor: pointer;
}
.nineBoxCellInactive {
width: 103px;
cursor: default;
color: #9fbbd0;
}
.nineBoxCellSel {
width: 103px;
background-color: #FFFF90;
cursor: pointer;
}
.nineBoxLink {
text-decoration: none;
color: #185184;
}
.nineBoxLinkInactive {
text-decoration: none;
}
.candGroupsContainer
{
border: solid 1px #5b7d96;
}
.candGroupsHeader
{
padding: 5px;
background-color: #5b7d96;
color: #FFFFFF;
font-size: 14px;
font-weight: bold;
border-bottom: 1px solid #9da1a5;
}
.candGroupsHeaderAdd
{
font-size: 13px;
color: #8aaac2 ! important;
float: right;
text-align: right;
font-weight: normal;
}
.candGroupsDefaultNoEdit
{
color: #aac8df;
}
.candGroupsGridItem
{
width: 100%;
padding: 3px 5px 3px 5px;
color: #5b7d96;
background: #d5e4ef;
border-top: solid 1px #b6cad9;
}
.candidateGrid
{
width: 305px;
border: 1px solid #9da1a5;
text-align: left;
}
.candidateGridHeader
{
padding: 5px;
background-color: #FFFF90;
color: #5b7d96;
font-size: 14px;
font-weight: bold;
border-bottom: 1px solid #9da1a5;
}
.candidateGridItemsContainer
{
max-height: 160px;
overflow: auto;
}
.candidateGridItem
{
color: #5A7194;
background: #ffffd3;
font-size: 12px;
padding: 3px 5px 3px 5px;
border-top: solid 1px #c5c9cd;
}
.manageGroupsLeft
{
float: left;
width: 205px;
}
.manageGroupsRight
{
float: right;
}
.promotabilityLevel
{
font-size: 13px;
font-weight: normal;
float: right;
text-align: right;
}
.grpDetailsCandidateHdr {
text-decoration: none;
padding-left: 8px;
height: 15px;
padding-top: 8px;
padding-bottom: 8px;
margin-top: 8px;
margin-bottom: 8px;
}
.grpDetailsCandidateContainer {
padding-left: 8px;
}
.compLabelsImg {
position: relative;
left: 130px;
}
.compLabelsImg2 {
position: relative;
left: -2px;
}
td.details_comp {
position: absolute;
left: 59px;
top: 15px;
}
td.details_dc {
font-family: Arial;
font-size: 10px;
border: 1px solid #476982;
width: 46px;
height: 22px;
position: static;
}
td.details_dc2 {
font-family: Arial;
font-size: 10px;
border: 1px solid #476982;
width: 46px;
background-color: #c4e1ff;
height: 22px;
position: static;
}
td.details_nc {
border: 1px solid #476982;
font-family: Arial;
font-size: 10pt;
margin-left: 5px;
width: 135px;
}
.positionCheckBoxList
{
padding-left: 30px;
}
label
{
margin: 5px;
}
.badInput
{
background: #FFFF90;
}
.gridTable
{
border-collapse: collapse;
width: 90%;
}
.gridTable td
{
border: solid 1px #666666;
padding: 5px;
}
.error
{
color: #FF0000 ! important;
}
.disabled
{
background-color: #F0F0F0;
}
.pager
{
line-height: 20px;
}
.pager a
{
text-decoration: underline;
}
option
{
padding-right: 15px;
}
.grid td
{
padding: 5px;
}
/*** Begin 3.1 Stuff ***/
.jobNormLabel
{
vertical-align:bottom;
}
.buttonGrey
{
height: 20px;
border: #314984 1px solid;
padding: 0px 5px 1px 5px;
color: #000000;
background-color: #f5f5f2;
}
.panelTop
{
background-color:#EDEBE7;
color:black;
font-size: 12pt;
font-weight:bold;
}
.panelControls
{
background-color:#EDEBE7;
color:black;
font-size: 12pt;
font-weight:bold;
}
.panelLogo
{
background-color:#EFEBDE;
color:black;
font-size: 14pt;
font-weight:bold;
}
.lnkNormal
{
color:#2525FF;
font-size: 12pt;
}
.lnkBold
{
color:#2525FF;
font-size: 12pt;
font-weight:bold;
}
.panelHeader
{
color:#749AE8;
font-size: 12pt;
}
.GridHeader
{
text-align: center;
padding: 5px;
background-color: #EBEADB;
color: #000000;
font-size: 12px;
font-weight: bold;
}
.chkBox
{
color: red;
background-color: #f5f5f2;
font-size: 12px;
}
.chkBoxPanel
{
color: red;
font-size: 12px;
}
.drpDownBox
{
color: #000000;
font-size: 12px;
}
.MainHeader
{
text-align: center;
padding: 5px;
color: #000000;
font-size: 14px;
font-weight: bold;
}
.breadLinkNew {
color: #3939FC;
text-decoration: none;
font-size: 12px;
}
.rdo
{
color: red;
background-color: #f5f5f2;
font-size: 12px;
}
.rdoPanel
{
color: red;
font-size: 12px;
}
.GridItem
{
color: #000000;
font-size: 11px;
text-decoration: none;
}
.contentText
{
color: #000000;
font-size: 12px;
text-decoration: none;
}
.multiText
{
color: #000000;
font-size: 12px;
text-decoration: none;
}
.contentDiv
{
color: #000000;
font-size: 12px;
text-decoration: none;
overflow:auto;
}
.buttonNew
{
cursor:pointer;
border:outset 1px #ccc;
background:#f5f5f2;
color:#666;
font-weight:bold;
padding: 1px 2px;
background:url(../images/formbg.gif) repeat-x left top;
}
.gridViewResults
{
overflow:hidden;
height:16px;
}
.sectionBox
{
border-right: navy 1px solid;
border-top: navy 1px solid;
border-left: navy 1px solid;
border-bottom: navy 1px solid;
padding: 5px;
background-color: #8ea2d4;
text-align: center;
}
.popupBox
{
border-right: navy 1px solid;
border-top: navy 1px solid;
border-left: navy 1px solid;
border-bottom: navy 1px solid;
margin-top: 25px;
margin-left: 25px;
padding-left: 5px;
margin-bottom: 7px;
color: white;
background-color: #8ea2d4;
}
/*** End 3.1 Stuff ***/
Please help!!