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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:50:42+00:00 2026-05-26T04:50:42+00:00

I have a div in my html called logo and what I am trying

  • 0

I have a div in my html called logo and what I am trying to do is drop the margin-top or padding-top the logo so its not hard up against the body background.

I have tried the above but I cannot get it to budge.

HTML:

<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>Template 2011</title>
    <link rel="stylesheet" href="_assets/css/style.css">
</head>
    <body>
        <header>
            <div id="logo"></div>
                <div id="line"></div>
                <nav>
                    <ul>
                        <li><a href="#">home</a></li>
                        <li><a href="#">services</a></li>
                        <li><a href="#">portfolio</a></li>
                        <li><a href="#">contact us</a></li>
                    </ul>
                </nav>
        </header>
        <section id="banner">
            <img src="_assets/images/banner_1.jpg" alt="Banner" width="960px" height="161px" />
        </section>
            <section id="content">
                <h1>Web Development Guru At Your Service </h1>
                    <p></p>



</section>
    <footer>
            <p>This is the footer</p>
        </footer>
            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
            <script src="_assets/js/cufon-yui.js" type="text/javascript"></script>
            <script src="_assets/js/Myriad_Pro_400-Myriad_Pro_700.font.js" type="text/javascript"></script>
            <script src="_assets/js/js.js" type="text/javascript"></script>

CSS:

html{
    height:100%;
    width:100%;
    background:url(../images/bg.jpg) repeat;
}
body{
    width:960px;
    height:100%;
    background-color:#e3e3e3;
    margin:42px auto;
}
p,h1,h2{
    margin:25px;
    font:Myriad Pro;
}
h1{
    color:#000;
}
header{
    width:100%;
    height:210px;
}
#logo{
    height:115px;
    width:159px;
    margin:0 auto;
    background:url('../images/logo.png') no-repeat;
    border:1px solid red;
}

header nav{
    width:410px;
    height:18px;
    margin:20px auto;
}
header nav ul{
    width:100%;
    height:18px;
    margin:0 auto;
}
header nav ul li{
    float:left;
    display:block;
    margin:0 auto;
}
header nav li a{
    float:left;
    width:85px;
    padding:0 3px 3px 3px;
    font:18px Myriad Pro;
    text-decoration: none;
    color:#99999a;
}
header nav li a:hover, a:active{
    font:18px Myriad Pro bold;
    color:#67686a;
}
#line{
    clear:both;
    width:610px;
    height:1px;
    margin:0 0 0 235px;
    background:url('../images/line.png') no-repeat;
}
#banner{
    width:100%;
    height:161px;
}
#content{
    float:left;
    width:100%;
    height:100%;
    background-color:#e3e3e3;
}
footer{
    clear:both;
    height:24px;
}
  • 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-26T04:50:42+00:00Added an answer on May 26, 2026 at 4:50 am

    Because it’s the background image, you have to add space (via padding or margin) outside the div.

    <div style="padding:10px;">
        <div id="logo"/>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally when you have a div created in html. You can check its width
I have a div that is created by Ajax with .append(html) function, I'm trying
I have a div directly under the body. My HTML looks like this: <body>
I have this code which can display drop down in div tag of html.
So, I have this div in my HTML called 'G36C', I also have a
So I have an empty div set to display:none called id=c1. I am trying
I have a div element in an HTML document. I would like to extract
I have created a simple layout using the HTML div tag. I would like
If I have 2 div tags: <div id=parentDiv> <div id=childDiv><!-- other html --></div> <!--
In the following HTML page, I have a div, which contains two spans (

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.