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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:42:01+00:00 2026-06-01T19:42:01+00:00

I’m new to HTML; however I have programming experience with Objective-C, here’s my code:

  • 0

I’m new to HTML; however I have programming experience with Objective-C, here’s my code:

<STYLE TYPE="text/css">
  .horiz {
    background-image: url(Banner.png); 
    background-repeat: repeat-x;  
    height:100px; 
  }
</STYLE>

My banner.png file is a 1×100 image and it goes across the screen fine, however the problem is that the banner indents from the top and left by a few pixels. I do not want this effect, and I have tried position:relative and top:0px left:0px, I have tried setting padding to zero all around (but neither have worked).

Basically, I want to achieve a similar effect to the top bar in Twitter, which hugs the top edges of the screen, but I cant figure it out. Thank you for your time in helping me!

p.s If it makes any difference, I’m using a tag in my body tag.

  • 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-06-01T19:42:02+00:00Added an answer on June 1, 2026 at 7:42 pm

    Your problem is likely unrelated to the background, and actually caused by paddings on the body element itself, which will prevent your .horiz element from fitting snug to the top of the viewport.

    Your HTML document, by default, will have some initial styles set. One of these, is padding on the <body/> element. It’s a common practice to use a reset stylesheet, such as the one provided by Eric Meyer. You can find it hosted on Chris Coyier’s website here: http://css-tricks.com/snippets/css/meyer-reset/

    Simply reference this first in your document, and then proceed to add all of your own custom styles. One additional thing that this does is normalize the stylistic differences that exist by default between the various browser vendors.

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

Sidebar

Related Questions

I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a reasonable size flat file database of text documents mostly saved in
I have thousands of HTML files to process using Groovy/Java and I need to
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.