468,136 Members | 1,451 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,136 developers. It's quick & easy.

css float left and linebreak

42
Hey,
Is it possible to change line on a float object?
For example let say I have one <b> tag, one <p> tag and one <img> tag:
I want the <img> to have float right and the <b> to have float left then I want the <p> to have float none so it will go around the image.
However if I have float left on the <b> tag the <p> will stay on the same line as <b> and the only way I know how to move it down is by giving the <b> tag a width on 100%

see attached image for an example of how I want it to align

Nov 8 '08 #1
5 3088
David Laakso
397 Expert 256MB
Anything is possible: providing it is based on fact, rather than incomprehensible gibberish. Put a test example on a public server and point to it in your post to the forum.
Nov 9 '08 #2
David Laakso
397 Expert 256MB
But wait, maybe it can be done. The question is, do I understand the question?

It may be a little inconsistent cross-browser but is this anywhere near what you're after?
Nov 9 '08 #3
Gozil
42
yes thats correct, I was was looking for something like clear: left.
thanks for helping!

PS:
I thought my image was quite informative :)
Nov 9 '08 #4
David Laakso
397 Expert 256MB
I thought my image was quite informative :)
It was informative. David the moron on this end didn't see it the first time around.

BTW, I am not sure, at the moment, what is causing the rendering difference among compliant browsers (difference in the space above the image). I am looking into it-- and if correctable, I'll post a revision
Nov 9 '08 #5
David Laakso
397 Expert 256MB
BTW, I am not sure, at the moment, what is causing the rendering difference among compliant browsers (difference in the space above the image). I am looking into it-- and if correctable, I'll post a revision


Please see revision on server:
Expand|Select|Wrap|Line Numbers
  1. body {
  2. font : 100%/normal /*helvetica, deleted*/arial, sans-serif;
  3. }
  4. img {
  5. margin : /*-141px*/ -155px 1px 10px 20px;
  6. }
  7. .c {
  8. line-height: 1/*added*/;
  9. }
  10.  
Additionally the cc's for IE/6 and IE/7 were revised.

The above changes on Mac 10.4 make Opera, Safari, Camino, and WebKit the same.
Firefox has been let to ride the image a little tighter to the top than
the other browsers...
Nov 9 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

15 posts views Thread by nAmYzArC | last post: by
5 posts views Thread by Marek Mänd | last post: by
2 posts views Thread by Penguinny | last post: by
2 posts views Thread by Dr. Richard E. Hawkins | last post: by
3 posts views Thread by hantechs | last post: by
5 posts views Thread by John | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.