OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Damn positioning
This page's ID:
10836
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
You want the boxes centered, eh? Yeah, centering can be a real pain... You could make a dummy div, give it "text-align:center;" and then put the stuff you want centered inside it. This works for IE, but I'm not sure about Mozilla. It's not the right way to do it, of course. You could also give "position:absolute; left:50%;" and then give it a negative left margin that is half the width of the box (in other words, you put the left edge in the center of the screen, then move it half of the box width to the left with the margin). Also (despite what I just wrote above), positioning is usually done with "left" and "right," rather than with the margins. Ah, you could also use JavaScript to find the width of the browsing area, calculate a centered position, and then move the boxes there (all with JS). It's been so long since I've done anything like that (years...) that I don't really remember how to do it, but I think H][RO mentioned that Drac used it for the page he put up in the site reviews a while ago... let me see if I can fish that out for you. [Edit: OK, got it. Check out [url=http://www.whatever.net.au/~cameron/transit/]Drac's page[/url] for an example of JS centering. You'll notice that it "jumps" into the center... you can avoid this by keeping all of your elements hidden until all of the calculations are done, then just show all the elements once they're positioned (all with JS, of course). Man, I used to do a lot of this stuff... it's starting to come back to me a little.] [img]http://disk919.com/sig/suho1004_0210.gif[/img] [url=http://faq.ozoneasylum.com/FaqWiki/shownode.php?id=270]Cell 270[/url] [This message has been edited by Suho1004 (edited 10-25-2002).]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »