whitespace around css background
-
I havn't been able to remove white space around my back ground graphics in the table. I put the background in the tag, and now I've tried it in a div tag, but neither will remove the space around the image. I've tried a lot of things with padding and margins, but nothing has worked yet. You can view the page here or below in the code box =) http://patrickmcnally.serverpowered.net/pball/get.php?cat=Guns&page\_num=1# [code] a:link { color: #00000; text-decoration: none;} a:visted { color: #00000; text-decoration: none;} a:hover, a:active { color: #00000; text-decoration: none;} #pics1 a.picsClass { margin: 0px 0px 0px 0px; width: 125px; height: 70px; color: #00000; text-decoration: none; font: 2px; line-height: 10%; } td { overflow: hidden; } table { padding: 0px 0px 0px 0px; } #mainTable td { margin: 0px 0px 0px 0px; max-width: 125px; max-height: 70px; width:expression( document.body.clientWidth > (500/12) * parseInt(document.body.currentStyle.fontSize)? "125px": "auto" ); font: 2px; line-height: 10%; } <!-- note the reversed pic1_name/pic1 from php --> function populateBox2(title, desc, pic1_name, pic2_name, pic3_name, pic4_name, pic5_name, pic1, pic2, pic3, pic4, pic5) { title = title.replace(/!!!/g, "\'"); desc = desc.replace(/!!!/g, "\'"); title = title.replace(/&&&/g, "\""); desc = desc.replace(/&&&/g, "\""); text1 = "<h2>"+title+"</h2>"+desc+"<br><br><a href=\"#\" onClick=\'populateBox1(\""+pic1+"\"); return false\'>"+pic1_name+"</a> "; if (pic2 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic2+"\"); return false\'>"+pic2_name+"</a> "; } if (pic3 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic3+"\"); return false\'>"+pic3_name+"</a> "; } if (pic4 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic4+"\"); return false\'>"+pic4_name+"</a> "; } if (pic5 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic5+"\"); return false\'>"+pic5_name+"</a> "; } //alert(text1); populateBox1(pic1); document.getElementById("box2").innerHTML = text1; } function populateBox1(picName) { document.getElementById("box1div").innerHTML = "<img src=\"images/" + picName + "\" id=\"box1\">"; //alert(picName); //document.getElementById("box1").src = "images/" + picName; var h = document.getElementById("box1").height; var w = docu</x-turndown>
-
I havn't been able to remove white space around my back ground graphics in the table. I put the background in the tag, and now I've tried it in a div tag, but neither will remove the space around the image. I've tried a lot of things with padding and margins, but nothing has worked yet. You can view the page here or below in the code box =) http://patrickmcnally.serverpowered.net/pball/get.php?cat=Guns&page\_num=1# [code] a:link { color: #00000; text-decoration: none;} a:visted { color: #00000; text-decoration: none;} a:hover, a:active { color: #00000; text-decoration: none;} #pics1 a.picsClass { margin: 0px 0px 0px 0px; width: 125px; height: 70px; color: #00000; text-decoration: none; font: 2px; line-height: 10%; } td { overflow: hidden; } table { padding: 0px 0px 0px 0px; } #mainTable td { margin: 0px 0px 0px 0px; max-width: 125px; max-height: 70px; width:expression( document.body.clientWidth > (500/12) * parseInt(document.body.currentStyle.fontSize)? "125px": "auto" ); font: 2px; line-height: 10%; } <!-- note the reversed pic1_name/pic1 from php --> function populateBox2(title, desc, pic1_name, pic2_name, pic3_name, pic4_name, pic5_name, pic1, pic2, pic3, pic4, pic5) { title = title.replace(/!!!/g, "\'"); desc = desc.replace(/!!!/g, "\'"); title = title.replace(/&&&/g, "\""); desc = desc.replace(/&&&/g, "\""); text1 = "<h2>"+title+"</h2>"+desc+"<br><br><a href=\"#\" onClick=\'populateBox1(\""+pic1+"\"); return false\'>"+pic1_name+"</a> "; if (pic2 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic2+"\"); return false\'>"+pic2_name+"</a> "; } if (pic3 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic3+"\"); return false\'>"+pic3_name+"</a> "; } if (pic4 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic4+"\"); return false\'>"+pic4_name+"</a> "; } if (pic5 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic5+"\"); return false\'>"+pic5_name+"</a> "; } //alert(text1); populateBox1(pic1); document.getElementById("box2").innerHTML = text1; } function populateBox1(picName) { document.getElementById("box1div").innerHTML = "<img src=\"images/" + picName + "\" id=\"box1\">"; //alert(picName); //document.getElementById("box1").src = "images/" + picName; var h = document.getElementById("box1").height; var w = docu</x-turndown>
-
Its all relevant minus the html and body tags =) Light and Love to you all -Patrick Arden McNally
-
I havn't been able to remove white space around my back ground graphics in the table. I put the background in the tag, and now I've tried it in a div tag, but neither will remove the space around the image. I've tried a lot of things with padding and margins, but nothing has worked yet. You can view the page here or below in the code box =) http://patrickmcnally.serverpowered.net/pball/get.php?cat=Guns&page\_num=1# [code] a:link { color: #00000; text-decoration: none;} a:visted { color: #00000; text-decoration: none;} a:hover, a:active { color: #00000; text-decoration: none;} #pics1 a.picsClass { margin: 0px 0px 0px 0px; width: 125px; height: 70px; color: #00000; text-decoration: none; font: 2px; line-height: 10%; } td { overflow: hidden; } table { padding: 0px 0px 0px 0px; } #mainTable td { margin: 0px 0px 0px 0px; max-width: 125px; max-height: 70px; width:expression( document.body.clientWidth > (500/12) * parseInt(document.body.currentStyle.fontSize)? "125px": "auto" ); font: 2px; line-height: 10%; } <!-- note the reversed pic1_name/pic1 from php --> function populateBox2(title, desc, pic1_name, pic2_name, pic3_name, pic4_name, pic5_name, pic1, pic2, pic3, pic4, pic5) { title = title.replace(/!!!/g, "\'"); desc = desc.replace(/!!!/g, "\'"); title = title.replace(/&&&/g, "\""); desc = desc.replace(/&&&/g, "\""); text1 = "<h2>"+title+"</h2>"+desc+"<br><br><a href=\"#\" onClick=\'populateBox1(\""+pic1+"\"); return false\'>"+pic1_name+"</a> "; if (pic2 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic2+"\"); return false\'>"+pic2_name+"</a> "; } if (pic3 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic3+"\"); return false\'>"+pic3_name+"</a> "; } if (pic4 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic4+"\"); return false\'>"+pic4_name+"</a> "; } if (pic5 != "") { text1 = text1 + "<a href=\"#\" onClick=\'populateBox1(\""+pic5+"\"); return false\'>"+pic5_name+"</a> "; } //alert(text1); populateBox1(pic1); document.getElementById("box2").innerHTML = text1; } function populateBox1(picName) { document.getElementById("box1div").innerHTML = "<img src=\"images/" + picName + "\" id=\"box1\">"; //alert(picName); //document.getElementById("box1").src = "images/" + picName; var h = document.getElementById("box1").height; var w = docu</x-turndown>
Hi , You write the following code in body tag topmargine="0" rightmargin="0" leftmargin="0" bottom margin="0" and also write cellspacing="0" and cellpadding="0" in every table tag Chetan Visodiya
-
Hi , You write the following code in body tag topmargine="0" rightmargin="0" leftmargin="0" bottom margin="0" and also write cellspacing="0" and cellpadding="0" in every table tag Chetan Visodiya