Having vertical margin errors when I remove the border property

Just messing around with some drawing in CSS and found this weird error-it's kind of hard to explain so i'll just post the code, but basically my margin-top property only works when I have a border on the divs, which I don't want because it throws off the centering

Body with Padding for an App

I am trying to learn CSS and am building an app in HTML with no scrolling. I'm taking many tutorials on CSS but am having a problem that feels almost embarrassing. I have a blue background and a white rectangular body, and I want the white body to have even spacing on all sides. I only have a header and a body in the DOM. The CSS file is pulled in externally. Here is my CSS, this is the best I've gotten so far:

html, body{

CSS positioning help

Hello everyone,

I'm working on an HTML/CSS portoflio website for my exam project and I'm facing some trouble with positioning of the different elements.

First of all, here's the site: www.kristianmaar.dk/portfolio (validates fine except for CSS3)

I want the #footer to position 20px below the #main-content-wrapper but since I've had difficulties with that using absolute/relative positioning I'm now positioning the footer elements with margin-top on the individual pages.

I'm only testing in Firefox/Safari/Chrome, latest versions.

Any suggestions?


Kraft CSS Framework -Redefining the way of CSS Coding

Download the Framework

You can download the framework from
[snip link--provide plain text version. not everyone has a safe environment in which to open untrusted zip files. ~gt]

You can download and use the framework freely in your own projects.

But don't forget to provide your feedback !!

Continue reading this thread to learn about how this framework works!!

What is this thread about?

unwanted margin to left of nab bar

Okey doke... here's a strange one for anyone whose interested:

I have a nab bar that seems to be aligned about 40px from the left of the window. But I can't figure out why its doing it! Here is a pic of it: http://tinypic.com/view.php?pic=ogxr3o&s=5

The only thing is, I really want to ensure that as you reduce the size of the window, all the buttons on the nav bar bunch up to remain on screen, as in the following pic:

Here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Syndicate content