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

Aligning an Inner Div to Top-Right of Parent Div

P: 3
Hello. I'm putting together a css layout, and I have a large header <div>. Within that <div>, I would like to have a smaller <div> to put some navigation in, and have it be aligned to the TOP-RIGHT of the parent "header div".

My layout is liquid and stretches the entire width of the screen, up until 1100px. (max-width)

So, I could use position:absolute to place the nav div in the top-right, no problem. However, when the page is viewed at a resolution that is larger than 1100px wide, the nav is obviously stuck to the very corner of the browser window, disconnected from the regular layout.

So my question is how to keep the TOP NAV div stuck to the top-right corner of the HEADER div when the page is viewed at a resolution larger than 1100px.

Here is a link to the page:
http://www.mattlongpre.com/syt/

Thanks!
Oct 24 '06 #1
Share this Question
Share on Google+
4 Replies


drhowarddrfine
Expert 5K+
P: 7,435
First observation: This is incorrect <li /> That is not a proper closing tag. You must follow it with a </li> You are confused with other xhtml closing tags.
Oct 24 '06 #2

P: 3
First observation: This is incorrect <li /> That is not a proper closing tag. You must follow it with a </li> You are confused with other xhtml closing tags.
Ah, thank you.
Oct 24 '06 #3

drhowarddrfine
Expert 5K+
P: 7,435
Positioning is always relative to the first positioned element. Your header is not positioned so just add position:relative to the containing div.
Oct 24 '06 #4

P: 3
Thank you very much! :D
Oct 24 '06 #5

Post your reply

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