corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » HTML help...


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author HTML help...
dna23
Member

Registered: 1st Nov 04
Location: Northamptonshire
User status: Offline
23rd Aug 05 at 21:27   View User's Profile U2U Member Reply With Quote

want to find a stable way of centreing a table vertically on a website.... any ideas?
ed
Member

Registered: 10th Sep 03
User status: Offline
23rd Aug 05 at 21:34   View User's Profile U2U Member Reply With Quote

How do you mean?
Jamie
Member

Registered: 1st Apr 02
Location: Aberdeen
User status: Offline
23rd Aug 05 at 21:41   View User's Profile U2U Member Reply With Quote

What you got so far...?
Dom
Member

Registered: 13th Sep 03
User status: Offline
23rd Aug 05 at 22:00   View User's Profile U2U Member Reply With Quote

edit - never mind, thought you meant setting a table centre of screen

eitherway - just use valign under the td tag, should set what ever is in there vertically centre

[Edited on 23-08-2005 by Dom]
dna23
Member

Registered: 1st Nov 04
Location: Northamptonshire
User status: Offline
24th Aug 05 at 15:47   View User's Profile U2U Member Reply With Quote

not that simple i'm afraid Dom.... i've created a series of images within a table and need it to be centred vertically on the page not just horizontally...

there's various CSS2 and div codes but IE/win doesn't support them
Dom
Member

Registered: 13th Sep 03
User status: Offline
24th Aug 05 at 19:20   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by dna23
not that simple i'm afraid Dom.... i've created a series of images within a table and need it to be centred vertically on the page not just horizontally...

there's various CSS2 and div codes but IE/win doesn't support them


you got the page live anywhere? placing the table inside another and then setting the tr/td tags to align centre etc etc should solve it?
dna23
Member

Registered: 1st Nov 04
Location: Northamptonshire
User status: Offline
24th Aug 05 at 19:21   View User's Profile U2U Member Reply With Quote

sorted it out mate... used 2 javascript codes

http://adambessell.i8.com
dna23
Member

Registered: 1st Nov 04
Location: Northamptonshire
User status: Offline
24th Aug 05 at 19:21   View User's Profile U2U Member Reply With Quote

<script src="main/1.js"></script>
<script src="main/2.js"></script>
<script>
//<![CDATA[
var o = this;
o.onload = function()
{
var brws = new Browser();
this.desk = new Desktop(brws);
};
o.popWindow = function(url)
{
this.desk.popWindow(url, "paypal", 800, 600, "scrollbars=yes");
};
//]]>
</script>
<style>
/*<![CDATA[*/
body {
margin: 0px;
background-color: #FFFFFF;
}
div {
border: 1px solid #FFFFFF;
position: absolute;
width: 400px;
height: 607px;
left: 50%;
top: 50%;
margin-left: -210px;
/*\*/
margin-top: -300px;
/**/
}
/*]]>*/
</style>

then <div> table code </div>

with the relevant 1.js and 2.js works with all browsers aswell
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
24th Aug 05 at 19:55   View Garage View User's Profile U2U Member Reply With Quote

Put it inside another table, which has a height 100% (which is not in the standards but most modern browsers render).

Simple example here - http://www.ruralweddings.com/
dna23
Member

Registered: 1st Nov 04
Location: Northamptonshire
User status: Offline
24th Aug 05 at 20:00   View User's Profile U2U Member Reply With Quote

sadly i did it the hard way but thanks for future referance... only problem is height 100% isn't supported on erm... Netscape i think it is and maybe Opera or one of the others
Dom
Member

Registered: 13th Sep 03
User status: Offline
24th Aug 05 at 20:06   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Ian
Put it inside another table, which has a height 100% (which is not in the standards but most modern browsers render).

Simple example here - http://www.ruralweddings.com/


was what i was going on about - but didnt explain it properly . And 100% width/height is supported in most browsers - certainly firefox/opera/IE - just leaves netscape (not sure about), and tbh it would be a small percentage that use that now

 
New Topic

New Poll

Corsa Sport » Message Board » Off Day » HTML help... 24 database queries in 0.0161800 seconds