Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Css Table Scaling
it01y2
post Feb 12 2008, 09:10 PM
Post #1


Member [Level 1]
****

Group: Members
Posts: 65
Joined: 7-July 05
Member No.: 9,139



I am currently new to css and html, i need to scale the table and pictures so it is 100% of the window width. Here's the code:

CODE
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
    <tr>
        <td width="01%">
        <img border="0" src="sdmenu/LEFTBOTTOM.GIF" width="10" height="25"></td>
        <td width="481" style background="sdmenu/main2.GIF">
        <p align="right"><b><font size="1" face="Arial">&nbsp;|
        <a target="rtop1" href="mainframe.htm">Home</a> |
        <a target="rtop1" href="gallery.htm">Gallery</a> |
        <a target="rtop1" href="aboutus.htm">About Us</a> |
        <a target="rtop1" href="contactus.htm">Contact
        Us</a> |</font></b></td>
        <td width="317" style background="sdmenu/main2.GIF">
        <p align="right"><font style="font-size: 8pt">
        <font face="Times New Roman">© </font>Rockin and rollin 2007</font></td>
        <td width="1%"><img border="0" src="sdmenu/RIGHTBOTTOM.GIF" width="10" height="25"></td>
    </tr>
</table>


I have uploaded it onto this website for testing http://daniel-llewellyn.co.uk/main.htm

Any ideas?
Go to the top of the page
 
+Quote Post
sonesay
post Feb 12 2008, 09:20 PM
Post #2


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 642
Joined: 20-June 07
From: Auckland
Member No.: 45,102



the margins and padding are left on by default causing the spaces. these values are different for each type of browser so setting it to always to 0 is best practice and then assigning any margins or paddings for other elements as needed

CODE
<body margin='0' padding='0'>


that code should do it. Your also not using css its just html code by the way. Best way to format and style your webpage is using CSS.

w3schools.com is a great site to start out learning.

good luck.
Go to the top of the page
 
+Quote Post
it01y2
post Feb 12 2008, 09:29 PM
Post #3


Member [Level 1]
****

Group: Members
Posts: 65
Joined: 7-July 05
Member No.: 9,139



added that code didnt work?
Go to the top of the page
 
+Quote Post
sonesay
post Feb 12 2008, 09:45 PM
Post #4


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 642
Joined: 20-June 07
From: Auckland
Member No.: 45,102



I thought that would of worked but it didnt sorry.

add this it worked for me I just tried it out now.

CODE

<html><head>


<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>New Page 2</title>
<style>
body{
margin: 0px;
padding 0px;
}
</style>
Go to the top of the page
 
+Quote Post
jlhaslip
post Feb 13 2008, 12:45 AM
Post #5


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,874
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



Width of 100% on the table will cause the table to be 100% of the *container* it resides in.
And some Browsers handle width to be only as wide as the content contained inside it.

We would need a link to the page or a posting of the entire page to assist further.
Go to the top of the page
 
+Quote Post
it01y2
post Feb 13 2008, 08:03 AM
Post #6


Member [Level 1]
****

Group: Members
Posts: 65
Joined: 7-July 05
Member No.: 9,139



np thanks for the help anyway, it works now, here's the code:
CODE
<body>
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
    <tr>
        <td style="size:auto;">
        <img border="0" src="sdmenu/LEFTBOTTOM.GIF" width="10" height="25"></td>
        <td width="60%" style background="sdmenu/main2.GIF" style="background-repeat:repeat-x;">
        <p align="right"><b><font size="1" face="Arial">&nbsp;|
        <a target="rtop1" href="mainframe.htm">Home</a> |
        <a target="rtop1" href="gallery.htm">Gallery</a> |
        <a target="rtop1" href="aboutus.htm">About Us</a> |
        <a target="rtop1" href="contactus.htm">Contact
        Us</a> |</font></b></td>
        <td width="40%" style background="sdmenu/main2.GIF">
        <p align="right"><font style="font-size: 8pt">
        <font face="Times New Roman">© </font>Rockin and rollin 2007</font></td>
        <td width="1%"><img border="0" src="sdmenu/RIGHTBOTTOM.GIF" width="10" height="25"></td>
    </tr>
</table>


</body>
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Adding Rows & Columns In Html Table Using Javascript(1)
  2. Create Table - Mysql Code - Help(1)
  3. Table/cell Link?(10)
  4. Man Arrested For Having Intercourse With A Table?(21)
  5. Table Duplication(5)
  6. Max Table Width(13)
  7. Css Table Layouts(8)
  8. Table Relationship Problem(2)
  9. Which Data Type To Use In Mysql Table(4)
  10. Another Question On Mysql Table Data Type(1)
  11. Using Multiple Selection Array In Table To Order Data(1)
  12. Tables2css(7)
  13. How To Draw Thin Table Lines(2)
  14. A Unique Time Table That Happens Every 1000 Years(6)
  15. New Custom Bbcode [table](20)
  1. Merge 2 Table In Mysql(3)
  2. Display MySQL results in a Table(8)
  3. Code To Install Mysql Database Table?(5)
  4. what is the 'test' mysql table for?(3)
  5. Help Setting Table Size.(2)
  6. Loading Mysql Data Into A Table(10)
  7. Showing Numbers Of Mysql Entries In A Database Table(7)
  8. Mysql Changing Date Format(3)
  9. Creating A Table(4)
  10. Usemap And Table Background Image Changing(5)
  11. Ie Table Width In A Div Tag(4)
  12. Klay World: Off The Table(1)
  13. Asp Dynamic Checkbox In A Table(1)
  14. Need A Code(3)
  15. How To Read Specific Row From Table(5)


 



- Lo-Fi Version Time is now: 24th July 2008 - 06:50 AM