![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a main div on a page that contains some text plus an img which is floated right, causing the image to be placed on the right of the div with the text on the left. However the height of the div sizes to fit the text but not the image. I want the div to size in height to fit the height of the image. After searching google I found a suggestion to add div style="clear:right"></div> at the bottom of the containing div just before the ending </div This seems to work ok in ie (although it screws up the left margin of the containing div for some reason) but in mozilla1.4/netscape 7.1 it doesn't have any effect. Is there another technique I could use ? |
#3
| |||
| |||
|
|
Tony Benham wrote: I have a main div on a page that contains some text plus an img which is floated right, causing the image to be placed on the right of the div with the text on the left. However the height of the div sizes to fit the text but not the image. That's correct behavior. I want the div to size in height to fit the height of the image. After searching google I found a suggestion to add div style="clear:right"></div> at the bottom of the containing div just before the ending </div This seems to work ok in ie (although it screws up the left margin of the containing div for some reason) but in mozilla1.4/netscape 7.1 it doesn't have any effect. That should work; in fact, I have used it with success in Mozilla 1.3/win2k. Check your html and css for errors. Then, supply a url. Brian, |
#4
| |||
| |||
|
|
Brian, Both css & html are css2.0, xhtml1.0 valid respectively. http://www.woodleyzebrasfc.com/testpic.html contains an example. This is sort of ok in ie6, apart from margin problem on left, but not in netscape7.1/moz1.4 ? |
#5
| |||
| |||
|
|
Tony Benham wrote: http://www.woodleyzebrasfc.com/testpic.html operation timed out. server problems? -- Brian follow the directions in my address to email me |
#6
| |||
| |||
|
|
I see no border in the div. How do you know the div's height isn't affected? Put borders around things -- bright borders -- to troubleshoot things. You know this better than I do. I'm looking at it for the first time. (BTW, that's the actress from "Buffy," right? It was my sister's favorite tv show.) |
|
If you are sure it is not working, try div style="clear: left"> </div but, I must admit, I use an empty div for this on my pages, and it works, Moz 1.3/Win2k. (?) adding   ; fixes it for mozilla. I'll try adding a |
#7
| |||
| |||
|
|
This seems to work ok in ie (although it screws up the left margin of the containing div for some reason) but in mozilla1.4/netscape 7.1 it doesn't have any effect. |
#8
| |||
| |||
|
|
In article <blhdcq$bd9a9$1 (AT) ID-170918 (DOT) news.uni-berlin.de>, Tony Benham wrote: Brian, Both css & html are css2.0, xhtml1.0 valid respectively. http://www.woodleyzebrasfc.com/testpic.html contains an example. This is sort of ok in ie6, apart from margin problem on left, but not in netscape7.1/moz1.4 ? "Works" with Opera 7.20, after I use fullscreen to get text and image side by side. It seems to make extra line at the bottom though. The reason it don't work on Mozilla is collapsing margins, I think. I'm not at all sure if W3 people intended collapsing happen here, but according to spec it should IIRC. Add some border, padding, or content to that extra div or borrom-border or -padding to container. For example, purple bottom border. |
|
BTW, the heading image slicing I promised to you is still not ready. http://www.student.oulu.fi/~laurirai...img_after.html The anti-aliasing is quick and dirty, and it is not tested much - and some of the images aren't optimized. The effect that you use on your current site about having black on right expand is propably impossible on IE. I guess if the white-black part of the image floated right and white is |
#9
| |||
| |||
|
|
"Lauri Raittila" <lauri (AT) raittila (DOT) cjb.net> wrote in message news:MPG.19e69eba79688dc4989c8d (AT) news (DOT) cis.dfn.de... In article <blhdcq$bd9a9$1 (AT) ID-170918 (DOT) news.uni-berlin.de>, Tony Benham wrote: Brian, Both css & html are css2.0, xhtml1.0 valid respectively. http://www.woodleyzebrasfc.com/testpic.html contains an example. This is sort of ok in ie6, apart from margin problem on left, but not in netscape7.1/moz1.4 ? "Works" with Opera 7.20, after I use fullscreen to get text and image side by side. It seems to make extra line at the bottom though. The reason it don't work on Mozilla is collapsing margins, I think. I'm not at all sure if W3 people intended collapsing happen here, but according to spec it should IIRC. Add some border, padding, or content to that extra div or borrom-border or -padding to container. For example, purple bottom border. Hi Lauri, I added padding : 1px ; to the extra div which fixes the problem, as does adding a into the div. Thanks for the tip. BTW, the heading image slicing I promised to you is still not ready. http://www.student.oulu.fi/~laurirai...img_after.html The anti-aliasing is quick and dirty, and it is not tested much - and some of the images aren't optimized. The effect that you use on your current site about having black on right expand is propably impossible on IE. |
|
I guess if the white-black part of the image floated right and white is filled in on the left that might work ok ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |