Can't center website
RWB
Icrontian
Now usually, there are other methods of doing this whichI would use, but this is for a project and I have to use LAYERS.
So I get the layers setup, took FOREVER to do... but I got them finnally. But I want the site CENTERED in the middle of the browser, I can't seem to figureo ut what I need to do. Can't find it in the book either.
I did it in dreamweaver btw... so it ain't clean yet cause I haven't gone through it by hand yet.
http://fusion-dm.net/Untitled-1.htm
If you don't see images, it is cuase they may still be loading... either way, I want to CENTER it, currently every layer(every image basically) is set to it's own area in space.
So I get the layers setup, took FOREVER to do... but I got them finnally. But I want the site CENTERED in the middle of the browser, I can't seem to figureo ut what I need to do. Can't find it in the book either.
I did it in dreamweaver btw... so it ain't clean yet cause I haven't gone through it by hand yet.
http://fusion-dm.net/Untitled-1.htm
If you don't see images, it is cuase they may still be loading... either way, I want to CENTER it, currently every layer(every image basically) is set to it's own area in space.
0
Comments
like
<body>
<center>
layers....
</center>
</body>
like I said im not a web coder..
gobbles..
Gobbles
Well, then I'm just guessing here but perhaps RWB should put it inside a single-cell table that is centered and then align the stuff w/in the cell.
haha, and get rid of that rogue < /td > tag at the bottom, dude
NS
I'm currently working on this site <a href="http://www.racetech-na.com">HERE</a> using "layers" and a JS to swap the visible/invisible.
Then encase all your DIVs inside <div id="Content">
Folks with older computers see a slightly smaller than 580x480 (expressed as X by Y) view area(remember side bars in browsers), they have about the 1\4 to 1\3 top of the screen with browser buttons and top window moving bar, etc. and they somewhat need to have the center centered.
Those with modern computers can see a bigger area, they have 1024x768 monitors instead of 800x600 on average for older computers. They see about 780x 580. Essentially you then know you cannot use absolute positioning and absolute width or absolute height. Esentially, if you center a div that is horizontal center, and if you then stick a table in that is a single cell that is height and width expressed as a percentage of screen you get a result that will give a small outside border and the browser will try to SCALE the site presentation. Then you can stick text in it, or layers in subcells if you want to force overall columns. Tables can be 0 border width, by the way, and this is what is wanted unless you want vertical or horzontal divisions. Then run your layers in divs inside the cells as 99% width and height and then you can do layer on layer within a cell if wanted if they are percentage postioned and you CAN use tables within tables if needed to make things align if you use zero border width and zero change in border color. Some browsers force a minimum border of one pixel, this is why you use percentages and base tables and then layers. doing this will let you see how to position layers to offset, and if while working you impose a 1-2 pixel border on each cell you can get positioning relative as to each layer's preset postion left, right, up and down. Most folks float only vertical and those with computers that are needing smaller res displays show pages as too wide and way too tall-- people look at narrow columns and have to use the vertical scroll bar a huge amount and most miss what is three vertical screens down. Play with tables first, change you monitor to 800x600 and 1024x768 and look at what you see, with and without a sidebar. Not all browsers support middle right, either, which is your vertical center code.
John-- who sees the site right shifted in Opera 7.21 and the blue navmenu text as too dark for the words but not the button borders (text should jump out from button).
TD-Isles, I tried what you said, and it just ain't working. I took out the position:absolute tages, that made the whole site become ONE long continuous page of pictures along the middle. Took out the positions, same thing. I am lost
BTW for those who say it's already centered, it is not, it is POSITIONED, I thought that would lower the confusion
Yeah, I noticed that not long after I posted, I decided to resize the window and noticed it wasnt moving at all.
Why dont you just set top, bottom, left and right margins and put a < center > tag around the whole thing?
NS
Yeah I have tried this, either I am doing it wrong(which I have tried looking through to see if I am and can't find jack) or it just ain't working. I haven't worked with "Layers" before either... :shakehead
Sorry, forgot one teeny little part. You need to encase a "container" div inside your centering div. I've done an example using the top row of your interface so you can see how it's done. You can take a look at it here. As you resize the browser window you can see that it remains centered.
but have you tried to just center the page, the main body.
I may be miss understanding but it seems that centering the page itself would fix the issue but i am sure that I am over simplifing things...
Gobbles..
Hope it came out right, but here is how it works; you use the "centerMe" ID for a div tag closing around the layers that needs to be centered. X being the width total, Y being the height total, and Z being HALF of X. That centers it, horizontaly and I am only guessing ATM that it works the same way with verticle center. But I changed my site to be a bit different, I just don't have the time for the next couple days to really test things.
But you can see what I did so far at My Site
I know it ain't purty, but it meets the requirements for the grade. I have a CG class I am working my ASS off trying to get anything done with, they really should have made CG one of the classes that was alone, instead of dual classes like this, my ass has been stressed out! Well not that bad haha, but it ain't been too easy, which I like to keep busy, but... ehh forget it I hate going off topic and trying to explain myself... it NEVER works out for me and you start thinking the wrong thing... and then POOF I am off
WTF am I talking about????
Then when finished creating the webpage convert to layers.
I don't know but is that considered cheating?