Hi, I have a small problem on a website i am making; have a look at it here. I don't understand why the image doesn't go all the way to the top of the page. Instead theres a bit of white space at the top... Any ideas as to why this is and how to fix it? Thanks.
<!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ABS Workout</title> <link href="main.css" rel="stylesheet" type="text/css" /> </head> <body background="images/blue-pixels-abstract-thumbnail.jpg" bgcolor="#ffffff"> <table width="800" border="25" align="center" cellpadding="1" cellspacing="1" bordercolor="#006699" bgcolor="#FFFFFF"> <tr> <td><div align="center"> <img align="top" src="images/banner.jpg" alt="Fitness Abs DVD" width="700" height="470" /> HTML:
<!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"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>ABS Workout</title><link href="main.css" rel="stylesheet" type="text/css" /></head><body background="images/blue-pixels-abstract-thumbnail.jpg" bgcolor="#ffffff"><table width="800" border="25" align="center" cellpadding="1" cellspacing="1" bordercolor="#006699" bgcolor="#FFFFFF"><tr> <td><div align="center"><img align="top" src="images/banner.jpg" alt="Fitness Abs DVD" width="700" height="470" /> HTML: try this?
Theres still no difference: http://www.abs-workout.net/home.html As you can see this problem has me completely confused.
replace <body background="images/blue-pixels-abstract-thumbnail.jpg" bgcolor="#ffffff"> Code (markup): By <BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0 background="images/blue-pixels-abstract-thumbnail.jpg" bgcolor="#ffffff"> Code (markup):
Forget all the html attributes. YOur table default to 100px top padding for some reason. Check this replace your table tag <table width="800" bordercolor="#006699" border="25" bgcolor="#ffffff" align="center"> HTML: With this <table class="mainTbl"> HTML: Now open up main.css and add this. /* * Style for main table align is not set in table but rather in the TD tag * Check out other border style types here: * http://www.w3schools.com/css/pr_border-style.asp */ table.mainTbl { color:#FFFFFF; padding-top:0px; width:800px; border:outset #006699 25px; } HTML: That should do it
Your problem is in main.css (line 30) : table { color:#FFFFFF; padding-top:100px; } Code (markup): The padding-top:100px; is causing you problems .. remove it