homepage Welcome to WebmasterWorld Guest from 50.19.169.37
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Image in floated div NN 4.x
nmknmk




msg:1176935
 1:41 pm on May 9, 2003 (gmt 0)

Hi all,

I have the following problem. I have a 2 column layout like this (simplified):

#menu{
float: left;
width: 40%;
}

#content{
float: left;
width: 60%;
}

The menu comes forts on the page, so it gets to be the left column.

I want to place an image and some text below it in the content div. In all browsers except NN 4.x it works with no problems. In NN the image lies on the text. What is wrong and is there a way to remedy the sutiation?

Sidenote: If I place the image below the text it gets cut off by the end of the div. I also added a div with clear:both as a property between the image and the end of the content div, but it made no difference.

Many thanks in advance,
nmknmk

 

rainborick




msg:1176936
 2:30 pm on May 9, 2003 (gmt 0)

According to Eric Meyer's handy Browser CSS Compatibility Chart, NS v4.x's support of float is buggy, so its unlikely there's a direct workaround. But sometimes you can at least get the information to the user by hiding the stylesheet (or at least the problem sections) from NS v4.x by using @import and letting the browser render the underlying HTML as best it can. Alternatives that also come to mind are initially using position:absolute; on these items and then update them to include a float:left in the @import stylesheet. Or you can make the HTML invisible to NS v4.x (and only NS v4.x) by surrounding it with <nolayers></nolayers>. It won't validate, but it works.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved