CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 3095|Reply: 15

Masalah nak "center" main table aku kat dreamweaver

[Copy link]
Post time 14-7-2006 01:26 AM | Show all posts |Read mode
1. Aku ada masalah nak center kan 'main' table (the table that contains all those banner and pictures)..masalahnyer..kat dalam dreamweaver mmg display center tapi bila kat web browser dia tak tunjuk center but left... pls help

2. macam mana nak buat top dn bottom dia bersambung dengan web browser? korang tak faham maksud aku? ok..cuba lihat lelaman www.espguitars.com .. cuba lihat table sebelah atas dia...ia bersambung dengan web browser...so kirakan straight up ... tapi tidak di sebelah bawah web itu...

dan ini adalah contoh table diorang atas dan di sebelah bawah web bersambung -- http://www.gbase.com/

<html>
<title>Welcome to Eden Online Shop ...</title>

<style type="text/css">
<!--
body {
        background-image: url(background.gif);
}
-->
</style><body>

  <tr>
    <td height="100%" colspan="2" align="center" valign="top"><table width="790" border="1" bordercolor="#000000">
      <tr bordercolor="#000000">
        <td height="43" colspan="2" align="center" valign="top"><img src="banner_eden.JPG" width="800" height="160" /></td>
      </tr>

      <tr>
        <td width="607" rowspan="3" align="left" valign="top" bordercolor="#000000"> </td>
        <td width="187" height="137" align="left" valign="top"></a><img src="vintage.gif" width="187" height="142" /></td>
      </tr>
          
      <tr>
      <td width="187" height="124" align="left" valign="top"><img src="guitar_ecard.gif" width="187" height="142" /></td>
      </tr>
          
      <tr>
      <td width="187" height="124" align="left" valign="top"><img src="dealer.gif" width="187" height="142" /></td>
      </tr>
          
      <tr bordercolor="#000000">
        <td colspan="2" align="center" valign="top"><table width="482" height="200" border="0">
       
         
          
            <td width="156" height="148"><img src="dadbutton2.jpg" width="156" height="130" /></td>
            <td width="156"><img src="dr-880_156x120.gif" width="156" height="130" /></td>
            <td width="156"><img src="wl156x120video.gif" width="156" height="130" /></td>
      </tr>
        
      <tr>
        <td height="50" colspan="3" align="left" valign="top"><p align="center"><br />
          <img src="mgr_animated_468x60_we_buy_drums.gif" width="468" height="60" />        </p>

          <p align="center"> </p>          </td>
      </tr>
    </table></td>
  </tr>
</table>



</body>
</html>

[ Last edited by  sLapshock at 14-7-2006 01:30 AM ]
Reply

Use magic Report


ADVERTISEMENT


Post time 14-7-2006 07:46 AM | Show all posts
mana opening tag untuk table? kenapa terus <tr> sedangkan <table> tak define lagi?
Reply

Use magic Report

Post time 14-7-2006 07:51 AM | Show all posts
salah satu cara guna nested table, tp cara ni rather unorthodox, sekarang ni pakai CSS lagi sesuai... anyway u can try to look at this sample code:



  1. <html>

  2. <body>

  3. <table width="100%" height="100%">
  4. <tr>
  5.    <td align="center" valign="middle">

  6.    <!-- nested table -->
  7.    <table width="400" height="300" border="1">
  8.    <tr>
  9.      <td>This is a sample table centered within a bigger table</td>
  10.    </tr>
  11.    </table>

  12.    </td>
  13. </tr>
  14. </table>

  15. </body>
  16. </html>

Copy the Code


one of the good sites to implement centered content (via CSS) is http://www.driftsafe.org , perhatikan susunan content dalam html page dan CSS stylesheetnya. very clean coding.
Reply

Use magic Report

 Author| Post time 14-7-2006 09:37 AM | Show all posts
kat code yg i paste kat atas tu ada salah tak? macma ada error table ker apa ker

anw masa aku letak <table> kat atas sekali to define...dreamweaver kata ...overlapping tag..it safe to remove..aku remove ok pulak.

[ Last edited by  sLapshock at 14-7-2006 09:50 AM ]
Reply

Use magic Report

Post time 14-7-2006 10:00 AM | Show all posts
overlapping tags jadi sebab i perasan u guna XML format untuk close tags, like so:
<td .... />

yang atas tu sama macam ni:
<td ... ></td>

so, kalau macam ni, salah:
<td ... /></td>

notice the slash at the end of the opening tag? itu biasanya digunakan untuk conform to XML standards for tags without closing tags (macam <br> dan sebagainya), so elok remove.
Reply

Use magic Report

 Author| Post time 14-7-2006 10:15 AM | Show all posts
ok i will remove it. anyway macam mana nak sambungkan tableto the top of th page .. contoh macam

www.gbase.com ... notice kat atas dia tak ruang... the iamge sambng to the very top of the page
Reply

Use magic Report

Follow Us
Post time 14-7-2006 10:57 AM | Show all posts
paling simple, set margin properties kat body tag

<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">

atau:

<body style="margin: 0;">
Reply

Use magic Report

 Author| Post time 14-7-2006 11:56 AM | Show all posts
ok dah boleh..cuma nak tanya..camna nak remove top border tapi...border border di kiri kanan masih kekal..

[ Last edited by  sLapshock at 14-7-2006 12:15 PM ]
Reply

Use magic Report


ADVERTISEMENT


Post time 14-7-2006 12:24 PM | Show all posts
tukar body style macam ni:

<body style="margin: 0px 20px 0px 20px;">
Reply

Use magic Report

 Author| Post time 14-7-2006 12:42 PM | Show all posts
ok nanti aku try..com laptop habis pula untuk test.... anw terima kasih banyak2 lah sangat
Reply

Use magic Report

Post time 14-7-2006 12:46 PM | Show all posts
no problem....

kalau nak mintak tolong buat website pun boleh :cak: :cak: :cak:

anyway selamat mencuba...
Reply

Use magic Report

 Author| Post time 14-7-2006 12:56 PM | Show all posts
tak menjadi la bro...hmm..masih ada border kat sebelah atas dia dan bawah of the table
Reply

Use magic Report

Post time 14-7-2006 02:58 PM | Show all posts
patutnya dalam dreamweaver ada code completion... senang sikit... saya kat sini takde so takbleh check...

try ni pulak:



  1. <body style="margin-top: 0; margin-bottom:0;">

Copy the Code


it's better to use stylesheets than embedded styles
Reply

Use magic Report

Post time 14-7-2006 02:59 PM | Show all posts
some info on spacing, margins and padding in web sites

http://www.yourhtmlsource.com/stylesheets/cssspacing.html
Reply

Use magic Report

 Author| Post time 14-7-2006 07:26 PM | Show all posts
ok thanks..i tried later..anw bengang ni...aku buat table..then when i wanted t move the nested table...dgn table table besar bergerak...dah jadi rojak table ku
Reply

Use magic Report

Post time 15-7-2006 08:42 AM | Show all posts
best way is to get used to stylesheets, guna <div> tags, sekarang standard macam tu... you may find that it's much more manageable and more professional.
Reply

Use magic Report


ADVERTISEMENT


You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic
...BYE 2024, HELLO 2025...
seribulan...BYE 2024, HELLO 2025...
Views : 54993 Replies : 13
...AZAM TAHUN 2025...
seribulan...AZAM TAHUN 2025...
Views : 55522 Replies : 25
[Netflix 2021] SQUID GAME Season 1,2,3 - Lee Jung Jae, Lee Byung Hun, Wi Ha Joon, Gong Yoo ~ 26 Dec 2024 (Season 2), 2025 (Final Season)
Rahah[Netflix 2021] SQUID GAME Season 1,2,3 -
Views : 29125 Replies : 254
...CHAT HUMANITARY...HAPPY NEW YEAR...
seribulan...CHAT HUMANITARY...HAPPY NEW YEAR...
Views : 44248 Replies : 29
V82: HANIS HAIZI B. ABD HAMID Melarikan Diri Dari Bayar Cukai LHDN Ke Los Angeles CA
anony-mousV82: HANIS HAIZI B. ABD HAMID Melarikan
Views : 11125 Replies : 449
New Chapter 01: FATTAH AMIN ~ Bebaskanlah mimpi-mimpi terindah
codenamedreamNew Chapter 01: FATTAH AMIN ~ Bebaskanla
Views : 47200 Replies : 1958
siri ikonik Korea, Squid Game 2 ditayangkan di Neflix hari ini
YgBenarsiri ikonik Korea, Squid Game 2 ditayang
Views : 13087 Replies : 5
Instafamous Rempit (kak yah, kak zah & the geng) part 3
hotmakInstafamous Rempit (kak yah, kak zah & t
Views : 232317 Replies : 1832
madu gula tok matahari
aaanf14madu gula tok matahari
Views : 109982 Replies : 1152
Acikpor vs. Ngai, isu tajaan MARA dikorek
maklukpenggodaAcikpor vs. Ngai, isu tajaan MARA dikore
Views : 52274 Replies : 1477

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

28-12-2024 06:18 AM GMT+8 , Processed in 0.067689 second(s), 30 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list