By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,765 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,765 IT Pros & Developers. It's quick & easy.

Placing Content at Top of Div Under Nav

P: n/a
I am having a great deal of difficulty in placing text within a div id
= content at the top of the div, directly below the div nav.

When you visit the site, http://www.tiredofmyproperty.com/ERCC/index.php,
you will notice the text in the div content right in the middle. I
would like to place it directly under the div id = nav section, but it
puts it in the middle.

My CSS is as follows for div content:
#content
{
padding:0;
margin-top:auto;
}

I can't figure it out. I have to be doing something wrong and I'm
sure it's something small.

Any help would be greatly appreciated.

Thanks.

Peter

Feb 17 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
pm****@yahoo.com wrote:
I am having a great deal of difficulty in placing text within a div id
= content at the top of the div, directly below the div nav.

When you visit the site, http://www.tiredofmyproperty.com/ERCC/index.php,
Without looking deep, I'm going to say that you need to fix the errors
first, before trying to get some padding to work.

<http://validator.w3.org/check?uri=http%3A%2F%2Fwww.tiredofmyproperty.com%2 FERCC%2Findex.php&charset=%28detect+automatically% 29&doctype=Inline&verbose=1>

2. This is a new document? Doctype should be Strict, as you aren't
Transitioning from anything. I would also recommend you use HTML 4.01
Strict, rather than XHTML.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Then revalidate.

3. You have multiple <bodyand </htmltags.

4. You are using fixed-size fonts, which means all those IE6 users with
vision problems won't be able to resize if they need to. See:
http://k75s.home.att.net/fontsize.html
and also note the notes on Verdana. Assign font sizes in percentage
units (100 of them), and set sizing for divs and such with em units.
Build a flexible page.
http://allmyfaqs.net/faq.pl?AnySizeDesign

5. Centered, and justified, text is hard for the eye to follow. Remove
the text-align: center from body { }, and only use it in your Nav bar.

Once you handle the above, you may find you don't have the problem you
asked about.

--
-bts
-Motorcycles defy gravity; cars just suck
Feb 17 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.