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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:50:32+00:00 2026-05-17T17:50:32+00:00

in the header section of my web page, the design is something like the

  • 0

in the header section of my web page, the design is something like the logo and navigation div should overlap a repeat-x image(i.e bg-header).

this is the html i have used

<div id="header">
    <div id="header-bar">
        <p>kljslakdjlaskjdkljasdlkjasdlkjaskldjasjd</p>
    </div>
</div>

and this is the css

#header {
    min-width: 1040px;
    height: 111px;
    position: relative;
}
#header-bar {
    margin-top:50px;
    height:53px;
}

now when in the #header-bar if i give margin-top:50px then the header div shifts the position to 50px from top. i want to achieve something like

the header div is to define the height of the header content.

i want to wrap header-bar in the header div and the elements or the div wrapped inside the header div should should have the margin of 50px from within the header.

for example the header-bar should have a margin of 50px from the top of the header div.

when i use the above code it moves the position of header div too. i want the header div to be fixed on top only the sub div or content within the header div is what i want to position.

hope i am not confusing you.

where i am going wrong?

thank you

EDIT: it works if i use padding-top but excluding the background with repeat-x property.

i want to move the image with repeat-x property. in the header-bg div

  • 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-17T17:50:32+00:00Added an answer on May 17, 2026 at 5:50 pm

    Use padding on the header div rather than margin.

    #header {
        min-width: 1040px;
        height: 111px;
        padding:50px 0px 0px 0px;
    }
    #header-bar {
        height:53px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to do simple header for website, [image][text][splitted horizontal section]: <div style=width: 930px;> <div
I have scripts in my ASPX page, in the header section. I want to
I've implemented this method to return the section header height. However, when the height
I followed this post to make my section header animate out of view when
I have a page where i have used framsets. Top Frame = header information(Like
MVC website- On the home page header section, I have a drop down with
I'm trying to create a comments section for a web page. However, the function
Section 15.1.3 in RFC 2616 states: Clients SHOULD NOT include a Referer header field
Something basic that i don't understand: I have header.php with navigation bar for my
I am having trouble animating a custom UITableView section header. The goal was to

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.