Floating wacked out

Posted on 2011-10-10
Last Modified: 2012-08-14
Why can't I float an image to the right of its related copy?  Below is a link to a page that I have been trying to get the Cuisine by Design logo to float in.  It keeps bumping down the next paragraph
img.floatright_pic {

Open in new window

Question by:nsitedesigns
    LVL 33

    Expert Comment

    Does the paragraph float left?

    Author Comment


    p {
          font-family: Arial, Helvetica, sans-serif;
          font-size: 12px;
          color: #00529A;
          margin:0px 45px 0px 260px;
    LVL 30

    Accepted Solution

    The main issue you have is that you have nothing containing each section. Everything is just kind of falling where it wants. For each section I would personally construct it like this:
    <div class="storyContainer">
    <h2>Cuisine by Design - November 10</h2>
    <img class="floatright_pic" width="200" height="123" alt="Cuisine by Design" src="img/logo_cuisine.jpg" align="right">

    Open in new window

    This will give you more control over the constraints of each section uniformly, whether it has an image or not.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
    In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at Browse or search based on font properties or name to find a suitable font for…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now