What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [self-split] tables vs. divs

[self-split] tables vs. divs
Author: Message:
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: [self-split] tables vs. divs
quote:
Originally posted by Sunshine
Yeah ok Leejeffy i knew that, but how do you get divs starting at a certain place without having to absolute position it...and so it will look same on all screen resolutions (autoadjusting div width)?

<style>
#randomdiv {
  position: absolute;
  left: 50%;
  margin-left: -100px; // Half of what you want the width to be

  top: 50%;
  margin-top: -100px; // Half of what you want the height to be

  width: 200px;
  height: 200px;
}
</style>

<div id="randomdiv">This text is in a centered box 200x200 pixels big</div>

Got the trick from TheGeek, thank him.

There is one more possibly easier way to do it:

<style>
body {
  margin: 0px auto;
  width: 100%;
  height: 100%;
}
#randomdiv {
  margin 0px auto;
  width: 200px;
  height: 200px;
}
</style>
Also, if you want something to be positioned around that, just center it at 50% and set the leftmargin to how far away it should be from the center

This post was edited on 07-09-2005 at 06:16 PM by ShawnZ.
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-09-2005 03:30 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[self-split] tables vs. divs - by WDZ on 07-09-2005 at 10:10 AM
RE: [self-split] tables vs. divs - by Sunshine on 07-09-2005 at 10:20 AM
RE: [self-split] tables vs. divs - by Eljay on 07-09-2005 at 10:21 AM
RE: [self-split] tables vs. divs - by Sunshine on 07-09-2005 at 10:25 AM
RE: [self-split] tables vs. divs - by -dt- on 07-09-2005 at 10:26 AM
RE: RE: [self-split] tables vs. divs - by mathieumg on 07-10-2005 at 11:13 PM
RE: [self-split] tables vs. divs - by ShawnZ on 07-09-2005 at 03:30 PM
RE: [self-split] tables vs. divs - by hmaster on 07-09-2005 at 05:02 PM
RE: [self-split] tables vs. divs - by CookieRevised on 07-09-2005 at 05:33 PM
RE: [self-split] tables vs. divs - by surfichris on 07-10-2005 at 04:02 AM
RE: [self-split] tables vs. divs - by L. Coyote on 07-10-2005 at 04:19 AM
RE: [self-split] tables vs. divs - by WDZ on 07-10-2005 at 05:19 AM
RE: [self-split] tables vs. divs - by Eljay on 07-10-2005 at 07:05 AM
RE: [self-split] tables vs. divs - by surfichris on 07-10-2005 at 07:08 AM
RE: [self-split] tables vs. divs - by WDZ on 07-10-2005 at 07:24 AM
RE: [self-split] tables vs. divs - by surfichris on 07-10-2005 at 07:28 AM
RE: RE: [self-split] tables vs. divs - by CookieRevised on 07-10-2005 at 09:33 AM
RE: [self-split] tables vs. divs - by WDZ on 07-10-2005 at 07:43 AM
RE: [self-split] tables vs. divs - by surfichris on 07-10-2005 at 09:49 AM
RE: [self-split] tables vs. divs - by saralk on 07-10-2005 at 10:28 AM
RE: [self-split] tables vs. divs - by hmaster on 07-10-2005 at 02:02 PM
RE: [self-split] tables vs. divs - by RaceProUK on 07-10-2005 at 02:41 PM
RE: RE: [self-split] tables vs. divs - by CookieRevised on 07-10-2005 at 03:00 PM
RE: [self-split] tables vs. divs - by surfichris on 07-10-2005 at 03:19 PM
RE: [self-split] tables vs. divs - by Yousef on 07-10-2005 at 03:27 PM
RE: [self-split] tables vs. divs - by CookieRevised on 07-10-2005 at 03:38 PM
RE: [self-split] tables vs. divs - by hmaster on 07-10-2005 at 03:47 PM
RE: [self-split] tables vs. divs - by Eljay on 07-10-2005 at 04:12 PM
RE: [self-split] tables vs. divs - by hmaster on 07-10-2005 at 06:12 PM
RE: [self-split] tables vs. divs - by Eljay on 07-10-2005 at 06:50 PM
RE: [self-split] tables vs. divs - by Yousef on 07-10-2005 at 06:59 PM
RE: [self-split] tables vs. divs - by ShawnZ on 07-10-2005 at 07:08 PM
RE: [self-split] tables vs. divs - by surfichris on 07-10-2005 at 10:27 PM
RE: [self-split] tables vs. divs - by ShawnZ on 07-10-2005 at 11:54 PM
RE: [self-split] tables vs. divs - by Eljay on 07-11-2005 at 07:19 AM
RE: [self-split] tables vs. divs - by fluffy_lobster on 07-13-2005 at 02:45 PM
RE: [self-split] tables vs. divs - by saralk on 07-13-2005 at 02:58 PM
RE: [self-split] tables vs. divs - by Eljay on 07-13-2005 at 04:07 PM
RE: [self-split] tables vs. divs - by fluffy_lobster on 07-13-2005 at 08:41 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On