Jump to content
xisto Community

Recommended Posts

Can you post some code, please. And do you mean vertically centred on the page instead of horizontally centred?

Share this post


Link to post
Share on other sites

You can use this html codes

<div style="position:absolute; top:45%">YOUR CONTENT HERE</div>

Attention! If the size of your content is 10% of page height then use 50-10/2 = 45 so use 45% at value of "top:"

One more example if the percentage if 25% then 50-25/2 =~ 38 so use %38 at value of "top:"

Edited by Erdemir (see edit history)

Share this post


Link to post
Share on other sites

absolute positioning can make the pages look kinda funky. like jlhaslip said posting codes could help us help you more.

you can try using the the margin and padding tag i think it could do the job CHECK HERE

Share this post


Link to post
Share on other sites

I'd do it this way:
Make this div tag:

<div id="whole_content" style="position:absolute;">content</div>write this java script:<script type="text/javascript">var height={write here the height of the element you wanna put in the middle of the page};document.getElementById('whole_content').style.left=Math.round((screen.height-height)/2)+'px';</script>
Notice from jlhaslip:
added code tags

Share this post


Link to post
Share on other sites

Use absolute positioning to centre the div to the 50%/50% location. this will place the top left of the div at the centre of the display. Then apply negative top margins to the div which is one half of the div's height, and apply a negative left margin of one half of the div's width.
results will be as per this sample page:

http://forums.xisto.com/no_longer_exists/

TYhe css for the div will look something like this:

#mydiv {	position:absolute;	top: 50%;	left: 50%;	width:30em;	height:18em;	margin-top: -9em; /*set to a negative number 1/2 of your height*/	margin-left: -15em; /*set to a negative number 1/2 of your width*/	border: 1px solid #ccc;	background-color: #f3f3f3;}

Share this post


Link to post
Share on other sites

This file is a private File. So you don't have rights to download this file.

It does not like me.

Share this post


Link to post
Share on other sites

And now it keeps bringing up a bad download. Doesn't like me either :D

Try a different file uploader...

 

http://forums.xisto.com/no_longer_exists/

http://imageshack.us/

https://www.sendspace.com/

http://files-upload.com/

http://forums.xisto.com/no_longer_exists/

http://www.filefactory.com/

http://forums.xisto.com/no_longer_exists/

 

how to make my intro page in the middle not CENTER

What do you mean exactly? I figure they are both the same....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.