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

  • Home
  • SEARCH
  • 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 1082201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:16:00+00:00 2026-05-16T22:16:00+00:00

I have three divs with content (h3 header, img, and p text) that are

  • 0

I have three divs with content (h3 header, img, and p text) that are approx. 400×300 and I am trying to get them to display inline, beside eachother. The image by itself displays properly, however when ever I add the h3 and or p text to it, it goes onto the next line. My guess is the h3 and p have built in breakers.

Is there anyway to prevent them from going to the next line, and still displaying properly?

ex. http://fireflyspices.com/

code:

    <ul>
    <li>
<div id="new_recipe">

<h3><a href="http://fireflyspices.com/?p=366" rel="bookmark" title="Permanent Link to Maybe?">
    Maybe?</a></h3><br />
<img src="http://fireflyspices.com/wp-content/uploads/2010/09/cajun-mojo-img.png"><br />
<p>I might like cjun mojoj</p>
</div>
       </li>

Regards,

  • 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-05-16T22:16:00+00:00Added an answer on May 16, 2026 at 10:16 pm

    The reason why this won’t work is because you cannot have block level elements inside inline elements, even if this was originally valid it is no longer true.

    Elements like li, h3 and p are called block level elements, and have characteristics such as expanding to fill up all space available to them and forcing surrounding contents onto new lines. You can check which elements are inline and which are block with the Sitepoint HTML Reference.

    You shouldn’t give display: inline to everything. In fact, every one of those you used in the recipe section can be removed. You can also remove the extraneous br tags once you do that. Margin and padding is far better if you need extra spaces. The styles you need is simply:

    #Recipe li {
      float: left;
      margin-right: 12px;
    }
    

    Removing the useless float: left on #Recipe would also help debugging in the future.

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

Sidebar

Related Questions

I have three DIVs, something like this: <div id=header> ... </div> <div id=content> <div
I have three divs : <div id=login /> <div id=content /> <div id=menu />
I have a page that has three divs one at the top, one at
i have a page that has sections as divs with inner divs and content.
What I'm trying to do is have three divs wrapped in a fixed width
I have three divs: A, B and C. A is currently visible and I
I have three unordered lists that have been created as Scriptaculous Sortables so that
I want to have several divs with content side-by-side like D1 D2 D3 D4
I have a div which contains two nested divs, one that specifies a height
I have a setup that requires a header div and a footer div to

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.