Jul 27, 2008

Css Table Scaling

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > CSS (Cascading Style Sheets)

free web hosting

Css Table Scaling

it01y2
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?

 

 

 


Reply

sonesay
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.

Reply

it01y2
added that code didnt work?

Reply

sonesay
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>

Reply

jlhaslip
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.

Reply

it01y2
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>

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. display table with many records by css - 3.78 hr back. (1)
  2. css table database - 4.94 hr back. (1)
  3. pure css positioning timetable - 32.08 hr back. (1)
  4. css scaling height - 53.08 hr back. (1)
  5. scale image table css - 53.59 hr back. (1)
  6. css scaling text - 91.65 hr back. (1)
  7. css table format - 34.91 hr back. (2)
  8. newgrounds table with css - 121.01 hr back. (1)
  9. css tables outline format - 124.54 hr back. (1)
  10. css table options - 82.94 hr back. (2)
  11. adding hover sdmenu - 198.28 hr back. (1)
Similar Topics

Keywords : css scaling


    Looking for css, table, scaling

Searching Video's for css, table, scaling
advertisement



Css Table Scaling



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE