473,847 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Top margin problem (Container div has a standard 10px or so margin?)

42 New Member

I've made a container div and put 2 div's inside of that for easy positioning..

The problem is that the container div has a standard 10px or so top margin which makes it go down too much.. Any idea how to fix this?

Here's my css :

[HTML]body {
background: #2b2b2b url(img/bg_image.gif) no-repeat top center;
font-family:Verdana, Arial, Helvetica, sans-serif;
color: #CCCCCC;

#container {
position: relative;
margin-left: auto;
margin-right: auto;
width: 553px;
margin-top: 0px;
padding: 0px;

#banner {
width: 553px;
height: 66px;
background: url(img/halobanner.gif) no-repeat top center;

#navbar {
width: 553px;
height: 20px;
margin-top: 6px;
text-align: center;

#content {
margin-top: 6px;
background:url( img/content.gif) repeat-y center;
height: 100%;
margin-left: auto;
margin-right: auto;
width: 565px;

body a:link, a:active, a:visited {
text-decoration: none;

body a:hover {
color: #003300;

p {
font-family:Verdana, Arial, Helvetica, sans-serif;
color: #CCCCCC;
margin-left: 6px;
margin-bottom: 3px;

And the page is here : http://theclan-name.com/school/games
Nov 22 '07 #1
1 3580
7,435 Recognized Expert Expert
I don't see any top margin on your content div.

One note. I see you are using 'display:block' on a <div> but divs are block elements so that is unnecessary.
Nov 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: paulroskilly | last post by:
Hello, I have the following css : body { background-color: #CACACA; margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px;
by: Anne DeBlois | last post by:
Hi, In VB 2005, I need to get the printer's left most and top most margin that a selected printer can prit to on a piece of paper, so I can adjust the PrintDocument classes to get as uniform as possible a printout no matter which print driver is selected. How do I get (and then set) this information in VB? Thank you so much in advance,
by: Edward | last post by:
I created a simple CSS layout (code and example below) for bloggin/writing but ran into five issues that I need help with: 1. How do I get rid of the right-margin red line on the last three right-boxes in Internet Explorer? 2. How can I put a 4px margin BETWEEN the right-boxes, "border-top: 4px" didn't do it and if I put in a "margin-top: 4px;" it shows the red underneath instead of the brown background graphic.
by: Miked | last post by:
Hello: I'm relatively new to CSS, and I'm doing a site where I don't want to use any tables. I've gotten pretty far, and the site has the layout I want. My only problem is that I'm using the flot positional paremter a lot on containers, and it really seems to do what I want. Except when I put other containers in these containers, they don't expand vertically like I want. Here's the stylesheet:
by: arathra | last post by:
Hi, hope someone can help with this. It's driving me mad. I have a container inside which is another DIV which is filled with pictures and then another DIV with some text. In FF the picture DIV scrolls horizontally which is as it should be. In IE, however, the Container scrolls and I can't seem to find a way to make the picture DIV scroll instead. The page is http://cristimodels.com/catalogue/item.asp?fIndex=2 CSS:
by: GTalbot | last post by:
Hello fellow authoring.stylesheets colleagues, Can someone please explain why the bottom margin of the last inflow block-level child in an overflowed parent should not have its margin reachable. I read and re-read carefully the CSS 2.1 spec and I just can not see why. Related webpages: http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/MarginBottomChildNotRendered.html
by: nathj | last post by:
Hi, I have been working on a redesign of a site. this is a site that was developed by someone else and the CSS has been built to fit with the CMS that they supplied. This redesign is nearly complete - and is fairly simple. there is one area of trouble though. the #container on the site is set to height 100% but, in FF it is resetting itself to 551px! The site in question is www.vardyfoundation.com and if you load this in IE7 and look...
by: tusovka | last post by:
I have a container and 4 divís inside it. My container is stretched to fill the entire window. In IE, if you resize the window all the content resizes correctly, with all 4 margins around the container visible. Iím trying to get the same behavior in FF, yet I canít seem to find the right CSS recipe. Note, if you past the HTML and CSS code and examine the behavior in the IE, Iím trying to achieve the same behavior in FF. <!DOCTYPE...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectóplanning, coding, testing, and deploymentówithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.