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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:11:39+00:00 2026-05-25T16:11:39+00:00

Something interesting is happening with my HTML code and I was hoping someone could

  • 0

Something interesting is happening with my HTML code and I was hoping someone could explain what is going on here.

I have a very simple website with a container div, header div, and body div and it looks like the html elements aren’t responding at all to the divs(They aren’t going in the div they are between in the html markup).

Was wondering why its behaving this way.

Here is the html:

<html>
<head>
<title>Andy</title>

<link rel="stylesheet" href="style-andy.css" type="text/css" media="screen" />

</head>

<body>

<div id='container'>

  <div id='header'>
    <h1>Andy </h1>
  </div>
  <div id='image'>
    <img src='main.jpg' />
  </div>
</div>


</body>
</html>

Here is the CSS:

html, body
{
  margin:0;
  padding:0;
}

#container
{
  width:1024;
  margin:0 auto;
}

#header
{
  width:1024;
  padding-bottom:10px;
  border:1px solid black;
}
#header h1
{
  float: right;
  display: inline;
  color: black;
  font-family: helvetica, arial;
  font-weight: 100;
}
#image
{
  width:1024;
  height:100;
  border:1px dotted yellow;
}
  • 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-25T16:11:40+00:00Added an answer on May 25, 2026 at 4:11 pm

    Your HTML looks fine, but your CSS is missing the px measurement on your widths and heights and your h1 tag is being made to float: right; meaning that the header div probably won’t have a height (You will need to ‘clear’ the header div)

    Edit:

    FYI, a simple way to clear is to just put a div with a class of clear under the content you need to clear, then use the CSS to tell that div to clear, for example:

    HTML:

    <div id="header">
        <h1>Andy</h1>
        <div class="clear"></div>
    </div>
    

    CSS:

    .clear {
        clear: both;
    }
    

    There are other ways of doing this, for example: http://www.webtoolkit.info/css-clearfix.html

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

Sidebar

Related Questions

I'm working on someone else's code and found something very interesting and hoping someone
I'm facing an interesting problem here. I have a piece of code where I'd
I was looking through a code tutorial just now, and found something interesting --
I just saw something very interesting in vk.com Basically in profile page the right
Just something interesting come in my mind. Assume that we have a table (in
I noticed something interesting while testing the client side validation on a website that
I recently saw something interesting in some c++ code: try { //doStuff } catch
We are trying to do something interesting but challenging: We have a couple thousand
Here's something interesting, turnsout that many people out there had this problem, but i
I discovered something interesting while writing code. I defined a macro in my code

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.