PDA

View Full Version : aligning photoshop slices


reachup
03-17-2006, 12:49 AM
I am trying to align slices made in Photoshop in a dreamweaver document. It looks fine in Opera browser but in Internet Explorer there are big gaps. Here is the code. It is the compositephotobackground-te.gifs that are the problem. I hope someone can help me.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x ; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('logo-button1.gif','star%20teachers%20english%20.gif','s tar%20prices%20english.gif','star%20map%20english. gif')">
<table width="686" height="95" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="125" height="95">
<div align="center">logo-button-inverse2.gif (index.htm)</div></td>
<td width="561" height="95">
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div></td>
</tr>
</table>
<table width="686" height="127" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="125" height="127">
<div align="center"></div>
<div align="center">star%20teachers.gif (teachers.htm)</div></td>
<td width="561" height="127" bgcolor="#FFFFFF">
<h5 align="center"></h5>
<h5 align="center">images/images/images/compositephotobackground-te.gif</h5></td>
</tr>
</table>
<table width="686" height="95" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="125" height="95">
<div align="center"></div>
<div align="center">star%20prices.gif (#)</div></td>
<td width="561" height="95">
<h5 align="center">images/images/images/compositephotobackground-02.gif</h5></td>
</tr>
</table>
<table width="686" height="95" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="125" height="95">
<div align="center">star%20map.gif (map.htm)
</div>
<div align="center"></div>
<div align="center"></div></td>
<td width="561" height="95">
<h5 align="center">images/images/images/compositephotobackground-03.gif</h5></td>
</tr>
</table>
<table width="686" height="95" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="125" height="95">
<div align="center"></div>
<div align="center">star%20inquiry.gif</div></td>
<td width="561" height="95" valign="top">
<h5 align="center">images/images/images/compositephotobackground-04.gif</h5></td>
</tr>
</table>


</p>


</p>


</p>
</body>
</html>

Please use code tags when posting code

edbr
03-17-2006, 02:11 AM
you have the images split across a number of tables try 1 table with 4 rows and 2 columns

reachup
03-17-2006, 08:29 PM
Thank you very much for your advice. I tried that and it works.

Creative Insanity
03-17-2006, 09:17 PM
Best to let IM create the html page as well then you only need to load that in DW and grab the table and toss into your own template or page. I created a VTM on how to do that named template.

reachup
03-24-2006, 06:14 PM
Sorry, I can't work out what IM means. I only do this sort of thing occasionally. Is VTM a cold fusion document? Anyway I would like to see it, where could I find it?

d a v e
03-24-2006, 06:46 PM
Image Rady perhaps??

domedia
03-24-2006, 06:52 PM
Some of your images are put inside header tags etc. Most of these elements have a default margin in the browser. If you remove the tags surrounding your images you'll see some difference. And unless you've changed your images to be block elements, you need to make sure there's no spaces before anf after the image tag.
Like this <td><img></td>
and not like this <td> <img> </td>

You also have empty tags which makes no sense like <div align="center"></div>