Author |
Message |
vulcanpimp
Junior WebHelper
Joined: 11 Mar 2003
Posts: 14
Location: uk
|
Posted:
Mon Mar 24, 2003 3:00 pm (21 years, 1 month ago) |
|
I have nearly always used proper layers - using the following syntax
<div id="Layer3" style="position:absolute; left:20px; top:274px; width:228px; height:22px; z-index:118" >
<a href="playwrite.html" class="myclass">Playwrite</a>
</div>
an example of its use would be
www.geocities.com/grahamrhodes
I always keep just one item to one layer whether that is a picture or text.
so far its never bothered me that the page doesn't center itself in the browser.
But does anyone know of a way to center pages in the browser using this strict layers method.
I thought of the following. Using JS to detect the amount of screen.availwidth and then testing the pages width. Then adjusting the content if there is miles of space. No idea
how to do this in netscape though.
thanks for reading |
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Mar 24, 2003 8:18 pm (21 years, 1 month ago) |
|
text-align: center; in the style should do it... |
________________________________ It's turtles all the way down... |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Mar 24, 2003 8:24 pm (21 years, 1 month ago) |
|
Adam, I think vulcanpimp wants to center the layer itself on the page... |
________________________________
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Mar 24, 2003 8:33 pm (21 years, 1 month ago) |
|
hmm...thats a little trickier. if the layer width was in percent, you could specify a margin-left so that there is equal space either side of it. I can't think of a way to do it with a fixed width. |
________________________________ It's turtles all the way down... |
|
|
|
verto
Senior WebHelper
Joined: 14 Jan 2002
Posts: 220
Location: Cambridge MA USA
|
Posted:
Tue Mar 25, 2003 1:56 am (21 years, 1 month ago) |
|
hmmm... could be wrong, but my guess is you'll need DHTML.
You might try searching some of the sites specializing in DHTML scripts, like:
http://www.dhtmlshock.com/ |
________________________________ >>>>>>>>>>>>>
GENERAL DISCLAIMER:This disclaimer may be void where null in all cases unless explicitly not unprohibited or (p)re-exclusively assigned by sufficient presedimentation on behalf of every non-interested party to wit (or so it was said).
:::
.: :. . : :....: :.: .: :. verto .: :. . : :....: :.: .: :. |
|
|
|
Hertzsprung
WebHelper
Joined: 30 Jul 2002
Posts: 56
Location: UK
|
Posted:
Tue Mar 25, 2003 8:38 am (21 years, 1 month ago) |
|
I don't quite understand why you need to absolutely position everything, and even less why you need different z-indexes for each div box. I tried looking at your homepage in Mozilla1.3b and it broke
You might try using default positioning and floating your navigation box left like this:
Code: | <div style="float: left">My nav box</div>Main content will flow around box. |
Just a thought
Impressive CV btw |
|
|
|
|
vulcanpimp
Junior WebHelper
Joined: 11 Mar 2003
Posts: 14
Location: uk
|
Posted:
Tue Mar 25, 2003 4:31 pm (21 years, 1 month ago) |
|
ended up just turning the layers into tables using dreamweaver (convert to tables)
then just added <center> and </center> covering the whole content.
guess I'm just lazy..always hated tables because they just don't make sense to a beginner
thanks for your help I'll try the suggestions |
|
|
|
|
verto
Senior WebHelper
Joined: 14 Jan 2002
Posts: 220
Location: Cambridge MA USA
|
Posted:
Tue Mar 25, 2003 8:41 pm (21 years, 1 month ago) |
|
vulcanpimp wrote: | ...guess I'm just lazy..always hated tables because they just don't make sense to a beginner... |
guess i'm old skool then... always thot tables were much simpler than layers..
heh... u mite just think of them as div tags with less features (and mucho more tags) ... |
________________________________ >>>>>>>>>>>>>
GENERAL DISCLAIMER:This disclaimer may be void where null in all cases unless explicitly not unprohibited or (p)re-exclusively assigned by sufficient presedimentation on behalf of every non-interested party to wit (or so it was said).
:::
.: :. . : :....: :.: .: :. verto .: :. . : :....: :.: .: :. |
|
|
|
Hertzsprung
WebHelper
Joined: 30 Jul 2002
Posts: 56
Location: UK
|
Posted:
Wed Mar 26, 2003 7:56 pm (21 years ago) |
|
verto wrote: | vulcanpimp wrote: | ...guess I'm just lazy..always hated tables because they just don't make sense to a beginner... |
guess i'm old skool then... always thot tables were much simpler than layers..
heh... u mite just think of them as div tags with less features (and mucho more tags) ... |
I'm a bit of old and new skool. I use div tags (though not z-index) for some layout, but use tables where CSS4 would otherwise have to be employed |
|
|
|
|
|
Page generation time: 0.131153 seconds :: 18 queries executed :: All Times are GMT
Powered by
phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme