Msg#: 4371053 posted 2:32 pm on Oct 5, 2011 (gmt 0)
I'm having issues using two separate areas without them moving, I've had this issue before and never came up with a solution so decided to put navigation area across the top rather than a box to the side.
I'm terrible at explaining things so I'll just have to provide screenshots!
I've done research and something mentioned of Hollys hack but now that no longer exists because the issue was in IE6? And someone also said something about "float" element but can't seem to get it right, when I set the content box to "float: right;" it just ends up on the left hand side of the page, which is rather annoying! Any ideas? Much appreciated!
The fundamental problem is that your 'content' is inside your 'nav' container. Adding content to 'nav' will push the 'content' container down. When you float the 'content' right then it is going to align with the right side of the 'nav' container which is only 240px wide and so is going to extend left from here.
Msg#: 4371053 posted 4:25 pm on Oct 7, 2011 (gmt 0)
Penders, thank you very much for taking the time to read into my issue and the code I posted! I was going to mention that what you suggested didn't work because originally I altered the "<div class="content"> tag beneath the 'nav' tag, which resulted in this:
However, I decided to change it and cut&paste the content tag and place it ABOVE the nav tag, which happily did resolve my issue. Thank you very much.
The reason why I originally placed the content tag within the nav tag was because this situation happened at the very start before I implemented images into the page and this temporally resolved it. From what I now know in hindsight, is that it was holding me back from doing what I was trying to do.
Msg#: 4371053 posted 2:23 pm on Oct 9, 2011 (gmt 0)
You're welcome. Just out of interest, you can arrange your markup in whatever order you like (having your content first is likely to be better for SEO), but you are likely to have to adjust your CSS...
In this case you could float the 'content' right and allow the 'nav' to flow to the left. Or, absolutely position the 'nav' on the left (which takes the 'nav' out of the flow of the page) and let the 'content' flow like normal, but give it a large margin-left (which you did in your example above) in order to 'clear' the 'nav'. With the 'nav' absolutely positioned, it wouldn't matter in which order the elements appeared in the markup.