473,657 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

text not wrapping around image floated right

Using a technique I found here:
http://www.vertexwerks.com/tests/sidebox/

I created these "dialogue" boxes:

http://www.ebph.org/test.htm

In IE6, the text does not wrap correctly around the image, which is
floated right. Any ideas / suggestions?

Thanks!

Ed

Dec 21 '05 #1
9 3712
edski wrote:

In IE6, the text does not wrap correctly around the image, which is
floated right. Any ideas / suggestions?

For IE: the <img> must be in the same block as the <p> for the text to
wrap around it. Move the <img> to the "boxbody" div.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Dec 21 '05 #2
Els
edski wrote:
Using a technique I found here:
http://www.vertexwerks.com/tests/sidebox/

I created these "dialogue" boxes:

http://www.ebph.org/test.htm

In IE6, the text does not wrap correctly around the image, which is
floated right. Any ideas / suggestions?


Probably because you gave the <p> position:relati ve; :

#content .boxbody p {
margin: 0 .2em .5em 0;
line-height: 1.5;
clear: none;
width: auto;
position: relative;
}

BTW, I think you forgot to hide this one from MacIE:
* html .boxhead h2 {height: 1%;} /* For IE 5 PC */

Besides that, the images are sticking out from the bottom of the
rounded borders when my window is full width, and in Opera the bottom
border is pushed down when that happens, only the left border and
rounded lower left corner don't, so that looks kinda weird.
Best give the .dialogue boxes a min-height equal to the height of the
picture plus space. For IE you can add the Holly hack (and hide it
from MacIE) to the .dialogue boxes just like you did with the
#content.

Not tested.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: David Bowie - Golden Years
Dec 21 '05 #3
Els wrote:

BTW, I think you forgot to hide this one from MacIE:
* html .boxhead h2 {height: 1%;} /* For IE 5 PC */


That's one reason why you should probably use zoom:1.0 instead of the
height property. It should give the same result without messing up MacIE
or possibly other browsers, including IE7 (if it ever comes out). It
won't validate, but then neither does the *html hack.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Dec 22 '05 #4
Els
kchayka wrote:
Els wrote:

BTW, I think you forgot to hide this one from MacIE:
* html .boxhead h2 {height: 1%;} /* For IE 5 PC */


That's one reason why you should probably use zoom:1.0 instead of the
height property. It should give the same result without messing up MacIE
or possibly other browsers, including IE7 (if it ever comes out). It
won't validate, but then neither does the *html hack.


But this validates:

/* \*/
* html .something {property:value ;}
/* */

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Electric Boys - Fire In The House
Dec 22 '05 #5
Thanks very much for all your replies. I really want to keep the photo
in the upper right corner, across from the <h2> in the .boxhead div,
so I may have to live with the IE rendering, unless I can find another
way to structure it.

Thanks again!

Ed

Dec 22 '05 #6
Els
edski wrote:
Thanks very much for all your replies. I really want to keep the photo
in the upper right corner, across from the <h2> in the .boxhead div,
so I may have to live with the IE rendering, unless I can find another
way to structure it.

Thanks again!


a) Please read this before you reply again:
http://www.safalra.com/special/googlegroupsreply/

b) There is no reason to live with the IE rendering, even if you want
the picture on the top right and the h2 on the left.

You have this code:
#content .boxbody {
background: url(images/body-l.gif) no-repeat bottom left;
margin: 0;
padding: 10px 20px;
height:1%;
min-height: 10.375em;
clear: left;
}

Make that height the same as the min-height, and IE will behave
nicely. Only you shouldn't let all the other browsers see it, as they
might stick to that height instead of expanding.
So, take out the entire height:1%; from the above code, and add this
bit to your styles:

/* hide from MacIE \*/
* html #content .boxbody{
height:10.375em ;
}
/* end hide from MacIE */

Now all browsers will leave the image on the right, the h2 on the
left, and the box's contents inside the box.

BTW - why does the first of those 3 boxes have an extra div around
div.boxhead?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Dec 22 '05 #7
> a) Please read this before you reply again:
http://www.safalra.com/special/googlegroupsreply/
Thanks and sorry.
So, take out the entire height:1%; from the above code, and add this
bit to your styles:

/* hide from MacIE \*/
* html #content .boxbody{
height:10.375em ;
}
/* end hide from MacIE */
Did this, but no difference in IE6 Win
BTW - why does the first of those 3 boxes have an extra div around
div.boxhead?


Was experimenting.. .

Dec 22 '05 #8
Els
edski wrote:
a) Please read this before you reply again:
http://www.safalra.com/special/googlegroupsreply/


Thanks and sorry.
So, take out the entire height:1%; from the above code, and add this
bit to your styles:

/* hide from MacIE \*/
* html #content .boxbody{
height:10.375em ;
}
/* end hide from MacIE */


Did this, but no difference in IE6 Win


Ah, I see what you mean now - I thought you meant the image sticking
out the bottom of the box when the window is wide enough to make the
text shorter than the image. The above measure solves that.

Now I realize you are still struggling with lack of wrapping.
That's caused by the height on .boxbody, because the image is outside
..boxbody. So we need to set that height on some element outside both
..boxbody /and/ the image. Like .sidebox or .dialogue.

I tested with .sidebox, works perfectly, as long as you also leave out
the scroll:auto; on .sidebox.

So, .sidebox styles become:

#content .sidebox {
margin: 0;
width: auto;
background: url(images/body-r.gif) no-repeat bottom right;
font-size: 100%;
clear: none;
min-height: 10.375em;
}

/* hide from MacIE \*/
* html #content .sidebox{
/* height:10.375em ;
}
/* end hide from MacIE */

And that bit with height for .bodybox should go.

The result of all that is of course, that the bottom left corner
image, which is linked to .bodybox, doesn't stay in the right place
when that element gets shorter.

So now, give the background styles of .bodybox to .sidebar, and the
background styles of .sidebar to .dialogue, and you're done.

(Tested ;-) )

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Dec 22 '05 #9
> Now I realize you are still struggling with lack of wrapping.
That's caused by the height on .boxbody, because the image is outside
.boxbody. So we need to set that height on some element outside both
.boxbody /and/ the image. Like .sidebox or .dialogue.


Thanks very much, Els. Works perfect. I really appreciate your help!

Dec 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5855
by: Vincent | last post by:
I noticed an irritating behaviour of the text-indent property and I wonder if I'm the only one to feel this way about it: it seems that text-indent applies even to floated elements. Although this is probably correct according to the specification (text-indent is inherited), don't you think it makes no sense to apply text-indent to such elements ? Here is an example: I have a paragraph, starting with a clickable image, that's followed by...
1
3524
by: Aaron | last post by:
I'm using relative positioning to move a right-floated image 10px upwards.. Text wrapping around the image should go underneath it once it reaches the bottom of the image, yet it acts as if the image is still in it's original position and doesn't start wrapping until it's 10px below the bottom of the image. How can I work around this? TIA, Aaron
0
2326
by: styler | last post by:
I am having difficulty with the page located here: http://tinyurl.com/2zwa9 I am creating a number of image sets (some left-, some right-aligned; an example of the right-aligned is shown the first figure below) in which the text accompanying the image sets flows down around them. The image sets have a single image on top and two immediately below. To create the effect, I contain the image on top in a DIV and float it, and the bottom...
2
13919
by: Suzanne Boyle | last post by:
I have the following code in a webpage: <p><img src="images/clydesdale.gif" width="100" height="41" style="float: left;" /> <strong>Test</strong><br /> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. <br /> visit website
2
5723
by: Newry | last post by:
Hi, I'm trying to position something with CSS, to have the equivalent of: <table> <tr> <td><img src="foo.jgp"></td> <td valign=bottom>Label</td> </tr> </table>
4
2888
by: sweep | last post by:
Hi there, I have a problem with some CSS I'm writing and I was looking for a little help. I have a nav bar at the top and left side of my page in CSS which work fine. The remaining space has a div which I'm using for body text. Floated to the right of this are two image boxes and a broken out quotation from the page (this box is wider than the images). The layout is working, except that the text in the main section doesn't seem to wrap...
0
2335
by: mephraim | last post by:
I have a page at (view in IE): http://rmc2.dev.leepfrog.com/ie_fix_me/index.html that has an image floated right outside of a main content div that looks like: <img src="blah" style="float: right; clear: right;> <div class="schoolofcenter">
1
3988
by: laura.paterson | last post by:
Hi, I'm new to html, and having difficulty getting my text to wrap around an image the way I'd like it to.. I have an image in the top left corner of a component, and if there is space, I'd like my text to start at the top right and wrap around the image. However, if there is a long word in my text (which is longer than the available space between the image and the left edge of the component) the the image overlaps the text. Ideally...
1
4191
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being aligned to the top, along with the slideshow and link buttons, you have to scroll down to see the text - how can I make IE6 display correctly? http://geekarama.co.uk/new_home.html here is the code for new_home.html and following that the CSS...
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.