hamza Posted September 13, 2008 Share Posted September 13, 2008 there is a code below actually the problem is in first row i have 2 td's and in 5th row i have 2 td's as well but when i width of bot rows td's are not accepting different widht as you see in the code row 1 td's have different width row 5 td's have different width but both are accepting one width why this is happening? <html> <head> <title>index</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- ImageReady Slices (wallpaper.psd) --> <table width="750" height="750" border="1" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="50"><img src="images/index_01.jpg" width="404" height="72" alt=""></td> <td width="96"><img src="images/index_02.jpg" width="346" height="72" alt=""></td> </tr> <tr> <td colspan="2" width="750"><img src="images/index_03.jpg" height="21" alt=""></td> </tr> <tr> <td colspan="2"><img src="images/index_04.jpg" height="26" alt=""></td> </tr> <tr> <td colspan="2" width="750"><img src="images/index_05.jpg" height="70" alt=""></td> </tr> <tr> <td width="200" height="750"> </td> <td background="images/spacer.gif"> </td> </tr> <tr> <td colspan="2">footer</td> </tr> </table> <!-- End ImageReady Slices --> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/124013-html-layout-problem/ Share on other sites More sharing options...
xtopolis Posted September 13, 2008 Share Posted September 13, 2008 Your <img width="" height=""> attributes are overriding your <td width / height> attributes, causing the rows/columns to be as big as the pictures they contain. I strongly suggest you stop where you are and go learn about CSS [Cascading Style Sheets] instead of using tables. I can see you're using a WYSIWYG editor, but it would help you immensely to code some layout design using CSS to see the advantage and time saving as opposed to using tables. Tables should be used for tabular data, not layouts. You'll thank me later. Quote Link to comment https://forums.phpfreaks.com/topic/124013-html-layout-problem/#findComment-640280 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.