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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:19:20+00:00 2026-05-13T01:19:20+00:00

Just looking at some CSS here, and I noticed: .head{position:relative;overflow:hidden;margin:-30px 0 0 -25px;width:820px;padding:20px 25px

  • 0

Just looking at some CSS here, and I noticed:

.head{position:relative;overflow:hidden;margin:-30px 0 0 -25px;width:820px;padding:20px 25px 0 25px;background:url(/images/bkg.gif) 0 0 no-repeat;}

Why would you put -30 and -25px margins?

  • 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-13T01:19:21+00:00Added an answer on May 13, 2026 at 1:19 am

    I started typing an answer, and then found a much better one here (Wayback Machine backup). Some salient points:

    Negative margins:

    • are valid CSS
    • don’t break page flow
    • have high levels of cross-browser compatibility (although if they break your link or floated image, then try adding position: relative; that should fix it)

    Their effect on unfloated elements:

    • applying them to the top or left of an element “pulls” that element in the appropriate direction(s)
    • HOWEVER, applying them to the bottom or right of an element “pulls” immediately subsequent elements into them, making them overlap

    Their effect on floated elements:

    • this is more complex and I can’t summarise it better than the article. Have a play around in Firebug to get a feel for them.

    There are some brilliant examples of negative margin use in that article (especially the 3-column layout! Magic. I’ve used a similar technique for page layout before.) The most common use for them I’ve found is just to move an element a small amount to correct its position, and to make one element overlap another for visual effect.

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

Sidebar

Related Questions

a bit of a softball CSS question here (hopefully). I'm looking for some CSS
I was just looking through some information about Google's protocol buffers data interchange format.
Does anyone have some numbers on this? I am just looking for a percentage,
I've done some Googling, and can't find anything, though maybe I'm just looking in
Just some days ago I started looking into a unit test framework called check,
I'm just starting to design some embedded devices, and am looking for resources. What
I just (re-)joined a company to work on some C++ projects. I'm looking at
Just looking for the first step basic solution here that keeps the honest people
Hi guys looking for some guidance, i have a knowledge of xhtml, css, javascript,
Just looking at ways of getting named constants in python. class constant_list: (A_CONSTANT, B_CONSTANT,

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.