HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
keep table in center
Post new topic   Reply to topic    HTML Help Forum -> HTML Table
View previous topic :: View next topic  
Author Message
busk



Joined: 29 Aug 2007
Posts: 4

PostPosted: Wed Aug 29, 2007 6:21 am     keep table in center Reply with quote

hello,

i have a few pages that are completely made in tabels.
does anyone know how i can center the tabel
on every window size?

gr,

Busk
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

PostPosted: Wed Aug 29, 2007 1:36 pm     Reply with quote

Centering and Centering one more time will help some.

Chances are, you have something like
Code:
<table style="width: 100%; text-align:left">
   <tr>
      <td style="width: 25%">&nbsp;</td>
      <td style="width: 50%">&nbsp;</td>
      <td style="width: 25%">&nbsp;</td>
   </tr>
</table>
and you could use an "old" way
Code:
<div align="center">
and this would easily align it in some browsers. Don't forget to close the tag as well so you would have something like:
Code:
<div align="center">
<table style="width: 100%; text-align:left">
   <tr>
      <td style="width: 25%">&nbsp;</td>
      <td style="width: 50%">&nbsp;</td>
      <td style="width: 25%">&nbsp;</td>
   </tr>
</table>
</div>

_________________
Corey
Toll Free Fax Numbers | Merchant Accounts
busk



Joined: 29 Aug 2007
Posts: 4

PostPosted: Wed Aug 29, 2007 9:29 pm     Reply with quote

i know that one,
i've tryed it but it doesn't work,
ore atleast not with firefox.
i was wondering if there are more possibilitys
to do this.


i've got a piece of the code here,
Code:
 
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/IDHosting-mousover_03.jpg','images/IDHosting-mousover_08.jpg','images/IDHosting-mousover_09.jpg','images/IDHosting-mousover_10.jpg','images/IDHosting-mousover_11.jpg','images/IDHosting-mousover_12.jpg')">
<div align="center">
  <table width="761" height="421"  border="0" cellpadding="0" cellspacing="0" bordercolor="efefef" id="Table_01">
    <tr>
      <td colspan="3">
        <img src="images/IDHosting-home_01.jpg" width="602" height="71" alt=""></td>
       <td colspan="2">
          <img src="images/IDHosting-home_02.jpg" width="158" height="71" alt=""></td>
       <td>
          <img src="images/spacer.gif" width="1" height="71" alt=""></td>
    </tr>

</table>
</div>
</body>
</html>
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

PostPosted: Thu Aug 30, 2007 3:40 am     Reply with quote

Then the one over at IWDN will work. That is the one I use on my sites and it works.

_________________
Corey
Toll Free Fax Numbers | Mile High Merchant Accounts | LoudCISP
busk



Joined: 29 Aug 2007
Posts: 4

PostPosted: Thu Sep 13, 2007 1:19 pm     Reply with quote

i have been searching for IWDN
but i can't quite understand what it is,

i just have a few layers in the body of my code like so,

Code:
<div align="center">
<div id="Layer2" style="position: absolute; left: 190px; top: 53px; width: 641px; height: 40px; z-index: 2">
  <div align="center"><img src="images/index_03.gif" width="641" height="40" alt=""></div>
</div>
<div id="Layer3" style="position: absolute; left: 190px; top: 93px; width: 448px; height: 620px; z-index: 3; vertical-align: middle">
  <div align="center"><img src="images/index_05.gif" width="448" height="620" alt=""></div>
</div>
</div>


but i just cant get it to align in the center of the screen, i just want it to be in the middle at all time.
does someone have another trick maby?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

PostPosted: Fri Sep 14, 2007 7:08 am     Reply with quote

You are using the absolute position. So no matter what you are doing, you are telling the divide to be in a specific place.

First - you need to figure out if you want it to be centered or rely on absolute positioning.

_________________
Corey
Toll Free Fax Numbers | Yahoo Merchant Account
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> HTML Table All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial