Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8237761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:34:37+00:00 2026-06-07T19:34:37+00:00

i was wondering what is wrong with this code? <style type=text/css> .recipe h2{ float:left;

  • 0

i was wondering what is wrong with this code?

<style type="text/css">

.recipe h2{
float:left;
}

.recipe .intro,
.recipe ol{
float:right;
width:500px;
}

</style>
</head>

<body>
<h1>Recipes for Cheese</h1>

<p class="intro">Cheese is a remarkably versatile food, available in literally hundreds of          varieties with different flavores and textures.</p>

<div class="recipe">

    <h2>Welsh Rarebit</h2>

    <p class="intro">Welsh Rarebit is a savory dish made from melted cheese, often Cheddar, on toasted bread, and a variety of other ingredients such as mustard, egg or bacon. Here is one take on this classic.</p>

    <ol>
    <li>Lightly toast the bread</li>
    <li>Place a baking tray, and spread with butter.</li>
    <li>Add the grated Cheddar cheese and 2 tablespoons of beer to a saucepan. Place the saucepan over a medium heat, and stir the cheese continuously until it has melted. Add a teaspoon of wholegrain mustard and grind in a little pepper. Keep stirring.</li>
    <li>When thick and smooth, pour over each piece of toast spreading it to the edges to stop the toast from burning.</li>
    <li>Place undre the grill for a couple of minutes or until golden brown.</li>
</ol>
</div>

</body>
</html>

Originally, the solution of this code should be just like the picture in the book here:
https://picasaweb.google.com/lh/photo/fDg4GiRbz3mCZvh2krcsqdMTjNZETYmyPJy0liipFm0?feat=directlink

This code above give me this:
https://picasaweb.google.com/lh/photo/kaH-7AE5K-UKMcxxlJdkrtMTjNZETYmyPJy0liipFm0?feat=directlink

I have read over and over afew times now and could not find anything wrong with this but have no idea why it does this.

Could anyone explain why it does this and how to correct it please?

Thanks so much in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T19:34:40+00:00Added an answer on June 7, 2026 at 7:34 pm

    Add a clear: right; after float:right;

    Live demo here http://dabblet.com/gist/3135429


    Both your .recipe .intro and your .recipe ol are floated to the right.

    .recipe .intro is the first one in the HTML, so it is the first one to the right. Unless you clear floats, .recipe ol won’t come under .recipe .intro, but to its left (as that is as far right as it can go).


    If you want the whole thing to come close to the h2, you might consider making a few more changes to the CSS:

    • first, give a fixed width to the h2, let’s say 400px; you could also set a text-align to it;
    • don’t float or give a fixed width to any of .recipe .intro or .recipe ol; instead, just give them a margin-left, that is equal to the width of the h2 (400px in this case);

    CSS:

    .recipe h2 {
        float: left;
        width: 400px;
        text-align: center;
    }
    .recipe .intro, 
    .recipe ol {
        margin-left: 400px;
    }
    

    Demo http://dabblet.com/gist/3135529

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering about the following code: <html> <head> <title>Test HTML</title> <link rel=stylesheet type=text/css
this code doesn't compile. I'm wondering what I am doing wrong: private static Importable
Was wondering where I am going wrong with this snippet of code, basically the
Just wondering why my code isn't working. Am I doing this completely wrong? window.onload
Im wondering if I'm doing something wrong, or if this is as good a
Having trouble with this code, wondering if I'm trying to achieve something impossible. I'm
I'm wondering what is wrong with my code (why is the animation so jerky):
Ok, i'm wondering if this code stored in user_login.php could be improved or if
I'm wondering how I can make this code safer, I'm using it as login.php:
I am wondering what am I doing wrong here? I cast the void pointer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.