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

Hey all, I have something of an interesting requirement for my project. I need
I just learned something interesting. The add method for the javascript select object in
Today when I was in computer organization class, teacher talked about something interesting to
Something I have always been interested in out of curiosity, is there a tool
I have this string containing a large chunk of html and am trying to
I ran across an interesting issue in some of my humanize_bytes() code. This loop
So, cPython (2.4) has some interesting behaviour when the length of something gets near
I was trying to reverse engineer Twitter-Live Search. Maybe we could discuss it here.
I wrote this simple code in python to calculate a given number of primes.
Something i've never really done before, but what is the best way to make

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.