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 8395777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:23:11+00:00 2026-06-09T20:23:11+00:00

I am trying to modify the HTML5 Boilerplate header to have a central image

  • 0

I am trying to modify the HTML5 Boilerplate header to have a central image with a word either side like so: header correct

as you can see I managed to do it, this was however only using parts of boilerplate and bad css that broke h5bp’s usefulness. I would like to utilize h5bp correctly now and achieve the same thing. I’m just not sure how to do it.

My current attempt looks like this:
header incorrect

The image is not in between the words, even tho the order in the mark up is like so:

<div id="header-container">
    <header class="wrapper clearfix">
        <div class="center">
            <h1 id="title">First</h1> <img src="img/mf_coffee_cup.png" alt="" height="280" width="340" /> <h1 id="title">Second</h1>
        </div>
        <nav>
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">Blog</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </nav>
    </header>
</div>

Relevant CSS:

.center { display: table; margin: 0 auto; }

#title
{
padding: 20px;
display: inline;
font-size: 4.5em;
border-top: 4px solid #5dc1c4;
border-bottom: 4px solid #5dc1c4; 
}

If anyone could explain why the text is not either side of the image that would be greatly appreciated.

Thank you

Edit:

While the answer below is valid I actually solved this problem by putting the < img > into the < h1 > instead of having them separated, like so:

<h1 id="title">First <img src="img/mf_coffee_cup.png" alt="" height="280" width="340" /> Second</h1>
  • 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-09T20:23:12+00:00Added an answer on June 9, 2026 at 8:23 pm

    With your HTML and just this CSS, the three items will display together on one line:

    .center h1 {display: inline;}​
    

    Working demo: http://jsfiddle.net/jfriend00/yK7Qy/

    FYI, I notice that you’re using the same id="title" in multiple places. That won’t work for you because a given id can only be present on one object in the page. You probably want to change that to class="title".


    It may be easier to just put all the text and image in one <h1> tag like this:

    <div id="header-container">
        <header class="wrapper clearfix">
            <div class="center">
                <h1>
                    <span class="title">First</span>
                    <img src="http://photos.smugmug.com/photos/344291068_HdnTo-Ti.jpg" alt="" />
                    <span class="title">Second</span>
                </h1>
            </div>
        </header>
    </div>​
    

    Demo here: http://jsfiddle.net/jfriend00/CHv4k/

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

Sidebar

Related Questions

I'm trying to modify a plugin so that image files from a directory can
I have the following html that I am trying to modify: <div class=col1 width8><img
I've been trying to modify a Google charts example in order to have three
I'm trying to modify a header using Middleware in Pylons to make my application
I'm trying to modify an object on a click. Here's what I have. <form>
I have been trying to modify HTML tag elements, I have a huge list
I'm trying to get the Build Script that's included in HTML5 BoilerPlate (http://html5boilerplate.com/) to
I'm trying to write a simple client-side text editor using HTML5 and Javascript. Is
I have am trying to modify the following example and make vertical tabs I
I have an issue i am trying to modify a form's tab order which

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.