Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to keep middle image sized properly in IE Re: How to keep middle image sized properly in IE

#120240
Jedireg
Member

added the following code to my CSS statements

` .TopCenterMS
{
position: Absolute;
top: 0px;
left: 287px;
height: 116px;
width: 562px;
overflow: visible;
border: none;
background: #ffffff;
background-color: transparent;
z-index: 1;
}
.TopCenterMS img
{
position: absolute;
top: 0px;
left: 0px;
height: 116px;
width: 562px;
z-index: 1;
}`

and then added some IE specific conditional statements in the body of my html as shown below

`


`

while this doesn’t give me a center image that dynamically resizes with the page, it does ensure the IE stretches the image to completely fill the space between the two edge images when it renders the page.

an interesting note however, the `` would not render correctly if formatted in the same format as the `` statement. IE would render it properly but not chrome. I suppose this is because chrome saw it as a comment and completely ignored it. took away the “–” on the beginning and ending of the code segment and chrome processes it completely as expected.

if anyone else has another way of doing this or improving on it, i’d be interested to see it.