Forum Moderators: not2easy

Message Too Old, No Replies

Vertical placement via styles?

         

Tonearm

12:25 am on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible to change the vertical placement of layout components via styles? I'd like to be able to put the code for the content of a page at the top, closest to the opening body tag, but have the navigation template appear above it in the page's display. This is better in case of a minimal browser right?

djclark

12:46 am on Nov 22, 2004 (gmt 0)

10+ Year Member




I asked the same question the other day

here is something that we found worked

Just what i was after, thanks for the help
finished results.

<style type="text/css">
<!--
#navbar {height:60px; width:396px;top:0; position:absolute; border:2px green solid;}
#content {margin-top:60px; position: relative;border:2px yellow solid; }
#footer {position: relative; border:1px black solid;}
#Container{width:400px; border:3px red solid; position:relative;}
-->
</style>
</head>
<body>
<div id="Container">
<div id="content">content in here</div>
<div id="navbar">Nav items...</div>
<div id="footer">footer</div>
</div>

Tonearm

1:34 am on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That looks great, thank you very much.

Tonearm

2:55 am on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm experimenting with this and I won't be able to specify a static pixel height for the navigation section. I have some text in there that affects the height. Is there anything I can do?

djclark

4:08 am on Nov 22, 2004 (gmt 0)

10+ Year Member



not that i know of.

i have been fortunete and have static size nav bars.

rjohara

4:14 am on Nov 22, 2004 (gmt 0)

10+ Year Member



The general thing you are trying to do is to create what's called a "source ordered" document. If you search Google for "source ordered" you'll find many sites which describe various approaches to this.

Tonearm

4:51 pm on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes source ordered definitely seems to be it. I'm looking through Google's results and this seems to be a tricky subject. Many different ways to make it work, and many different bugs to pop up in different browsers. Please let me know if you have a particular 3-column and/or vertical placement technique that works well.

Tonearm

5:06 pm on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I found this linked from webmasterworld:

[positioniseverything.net...]

It seems good, but I can't seem to find one that allows you to use a header & 3-column design with the content (middle column) at the very top of the source. Is this possible?