September 15, 200916 yr I'm having some trouble with a layout, I've basically created a psd file and made 2 different .png files, 1 called content.png and one called backlay.png, The backlay is the background image but it has like a green bar about 200 pixels high, Like a bar, And when i add a table and centre it in the html and add the content.png to it, I can't get it to align correctly, Like the top part is higher and the content.png in the table is a little bit lower, It could be because the table won't reach the top of the page. I was thinking of using a frame and CSS to align it but i'm not sure, Anyone got any idea's.? It's hard to explain so i'll upload so here is a picture and the code. <html> <head></head> <body> <table width="800" height="613" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="imgs/complete_bg.png"> </td> </tr> </table> </body> </html> I know it's a stupid thing to help with but it confuses me, Thanks!
September 15, 200916 yr Hi Smudge it looks like margin and padding problem. Please try this css file, put the file in same directory with html and attach it to the your page. Use document type always; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>what a beatiful resetted html page</title> <link href="css/reset.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="800" height="613" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="imgs/complete_bg.png"> </td> </tr> </table> </body> </html> reset.css
September 15, 200916 yr Author Hi Smudge it looks like margin and padding problem. Please try this css file, put the file in same directory with html and attach it to the your page. Use document type always; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>what a beatiful resetted html page</title> <link href="css/reset.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="800" height="613" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="imgs/complete_bg.png"> </td> </tr> </table> </body> </html> Thank you! The CSS File worked and the alignment has worked perfectly! Never knew it could be so simple looking at the css. I forgot to add doctype, I was rushing it a little bit. But again Thank you
Create an account or sign in to comment