Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help with CSS buttons and item placement Re: Help with CSS buttons and item placement

#79165
virtual
Participant

To start with before anything else you need a doctype or IE will not play nice. See this http://www.w3.org/QA/2002/04/valid-dtd-list.html, I would suggest HTML 4.01 transitional which will allow you some leeway as a newbie.

Your unique div tag is not closed.
Your body tag is not closed, and you should be using the css to declare the body background colour. The font used should also be defined in the css in the body tag together with font-size and colour, and when you specify which font-family you should give a selection like this:

Code:
body {
background: #333;
font: 13px/1.5 Arial, Helvetica, sans-serif;
color: #FFF;
}

You should also be defining your divs with id’s (used only once on a page) or classes (can be used several times on a page) and styling them accordingly with margins to space them out, not using <p>&nbsp;</p> for your spacing. Do not use capitals for html tags, as some of your <p> tags are. A typical layout would look like this

Code:




Name of your website and or page

All the content of your site goes in here, this can be divided into 1, 2 or 3 divs for left, centre and right content.



If you need some layout examples you can download them from this site http://www.code-sucks.com/css%20layouts/

Lastly, as a newb always run your html through the validator http://validator.w3.org/ it will point out errors that you can’t see and help you correct your code.

Sorry this really didn’t answer your questions, but it is best to get the basics right or things will become much harder to debug later on.