Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CSS Float - how to "turn off" for subsequent content

 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a page that contains an image. There is some text describing that image. I want that text to appear next to the image, so I am setting the CSS float attribute to 'right' on the image. That parts works.

This image and its description appears at the end of a topic. I do not want the next topic to appear next to the image since it would be confusing, and that section is going to have its own image to discuss. This does not happen when viewed in a browser that is wide. Below is a representation of what I am getting and what I want:

What I am getting


What I want


And here is the markup:


I'm trying to determine how to force the next section to not float next to the image. Any help is appreciated.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look into CSS's

clear: [both | right | left]

Eric
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric. I figured it had to be something simple.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic