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 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 vertically stacked. Header, content and footer. All of them have
I have three divs, within a content div. Container width 70%. Within that I
I have three DIVs, something like this: <div id=header> ... </div> <div id=content> <div
Have three divs in a container that I want to float over a large
i have three divs like that: <div id=1 >id=1</div> <div id=2>id=2</div> <div id=3>id=3</div> Now
I have three divs stacked on each other but offset so that a part
I have a page that has three divs one at the top, one at
I have an inline styles in my page as : <head> <meta http-equiv=Content-Type content=text/html;
I have written a html page where i want a header,content,footer. All these three
I have the following html structure <div id=content> <div id=transport> <div id=header>Header Text</div> <div

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.