This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes CSS Float - how to Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "CSS Float - how to "turn off" for subsequent content" Watch "CSS Float - how to "turn off" for subsequent content" New topic
Author

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

Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

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

Joined: Nov 08, 2001
Posts: 15376
    
    6
look into CSS's

clear: [both | right | left]

Eric
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

Thanks Eric. I figured it had to be something simple.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: CSS Float - how to "turn off" for subsequent content