Dreamweaver: come togliere il bordo alle immagini collegate.
Ciao Pentesilea,
quando associ un collegamento HTML ad un’immagine, essa viene per default gestita con il parametro border="1".
Per togliere il bordo all’immagine basta impostare il valore del border a 0 (vedi ad es. l’opzione border in Dreamweaver MX 2004 quando selezioni l’immagine), oppure direttamente dal codice, aggiungi nel tag img: border="0".
Lo stesso parametro border viene usato e definito anche per le tabelle, le celle, ecc.
Ciao,
purtoppo la procedura che mi hai descritto l’ho già fatta è solo che mi rimane sempre questo
bordo che voglio togliere.
Che altra impostazione di default dovrei togliere visto che questa dovrebbe essere l’unica?
Grazie
Controlla il TAG Body.
Oppure, per risolvere velocemente il problema, puoi ridefinire il TAG IMG, impostando:
Effetti > Nessuno.
Ma questo è solamente un modo per aggirare l'ostacolo; ti conviene risolvere il problema verificando il codice.
Sì, è senza dubbio un problema di codice. Se vuoi puoi anche incollarlo qui, così gli diamo un’occhiata.
Grazie Jana per il tuo contributo.
Ecco il codice:
<!-- Commento usato per non interferire con il codice del forum di 001design.it.
<html>
<head>
<title>Artstation.it, illustrazione, grafica e web design
<meta name="description" content="Artstation.it, illustrazione, grafica e web design">
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Artstation.it, illustrazione, grafica, web design, allestimento mostre e fotografia">
<meta name="keywords" content="illustrazioni">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
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_findObj(n, d) { //v4.0
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 && document.getElementById) x=document.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 bgcolor="#000000" text="#ffffff" link="#FFFFFF" onLoad="MM_preloadImages('images/home/labr01.gif','images/home/labr02.gif','images/home/labr03.gif', 'images/home/labr04.gif','images/home/labr05.gif','images/home/labr06.gif','images/home/labr10.gif')">
<table border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td colspan="6">
<div align="right"><img src="images/home/logo.gif" width="383" height="77"></div>
</td>
</tr>
<tr>
<td colspan="6">
<div align="right"><img src="images/spaziatore.gif" width="8" height="8"></div>
</td>
</tr>
<tr>
<td height="237"><a href="web.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('web','','images/home/labr01.gif',1)"><img name="web" border="0" src="images/home/lab01.gif" width="138" height="238"></a></td>
<td height="237"><a href="grafica.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('grafica','','images/home/labr02.gif',1)"><img name="grafica" border="0" src="images/home/lab02.gif" width="177" height="238"></a></td>
<td height="237"><a href="illustrazioni.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('illustrazioni','','images/home/labr03.gif',1)"><img name="illustrazioni" border="0" src="images/home/lab03.gif" width="149" height="238"></a></td>
<td height="237"><a href="gallery.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('gallery','','images/home/labr04.gif',1)"><img name="gallery" border="0" src="images/home/lab04.gif" width="133" height="238"></a></td>
<td height="237"><a href="museo.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('museo','','images/home/labr05.gif',1)"><img name="museo" border="0" src="images/home/lab05.gif" width="273" height="238"></a></td>
<td height="237"><a href="fotografia.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('fotografia','','images/home/labr06.gif',1)"><img name="fotografia" border="0" src="images/home/lab06.gif" width="102" height="238"></a></td>
</tr>
<tr>
<td><img src="images/home/lab07.gif" width="138" height="73"></td>
<td><img src="images/home/lab08.gif" width="177" height="73"></td>
<td><img src="images/home/lab09.gif" width="149" height="73"></td>
<td><a href="mailto:michelangeloscamardi@artstation.it"></a><a href="contatti.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('lab10','','images/home/labr10.gif',1)"><img name="lab10" border="0" src="images/home/lab10.gif" width="133" height="73"></a></td>
<td><img src="images/home/lab11.gif" width="273" height="73"></td>
<td><img src="images/home/lab12.gif" width="102" height="73"></td>
</tr>
</table>
</body>
</html>
[I]Fine commento utilizzato per non interferire con il codice del forum di 001design.it. -->
Posso vedere la pagina on-line?
Sembra essere tutto regolare, a parte il doppio meta name Keyword che deve essere uno solo.
Associandomi alla richiesta di Jana, intanto puoi anche provare a togliere il Javascript del cambia immagine per escludere che possa essere quella la causa di tutto.
Di bordi non ce ne sono nè sulla tabella nè sulle immagini, secondo me stai guardando sempre la stessa pagina - AGGIORNA LA PAGINA CON F5!!!
Dopo di che mi permetto di chiederti di buttare via la funzione di Dreamweaver che fa il rollover alle immagini e di usarne una più snella, io te ne ho trovata una, non è mia ma è bellissima e potrai fare a meno sia dei terribili "MM_swapImage" e "MM_swapImgRestore" che del bruttissimo "MM_preloadImages"...
Funziona con qualunque browser in grado di eseguire gli script che usavi tu...
ecco come verrebbe più "pulita" la tua pagina..
<!-- Commento usato per non interferire con il codice del forum di 001design.it.
<html>
<head>
<title>Artstation.it, illustrazione, grafica e web design</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Artstation.it, illustrazione, grafica, web design, allestimento mostre e fotografia">
<script type="text/javascript">
function init() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr.getAttribute('hsrc')) {
imgTemp[i] = new Image();
imgTemp[i].src = imgarr[i].getAttribute('hsrc');
imgarr[i].onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute('hsrc'))
}
imgarr[i].onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=init;
</script>
</head>
<body bgcolor="#000000" text="#ffffff" link="#FFFFFF">
<table border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td colspan="6">
<div align="right"><img src="images/home/logo.gif" width="383" height="77"></div>
</td>
</tr>
<tr>
<td colspan="6">
<div align="right"><img src="images/spaziatore.gif" width="8" height="8"></div>
</td>
</tr>
<tr>
<td height="237"><a href="web.htm"><img name="web" border="0" src="images/home/lab01.gif" hsrc="images/home/labr01.gif" width="138" height="238"></a></td>
<td height="237"><a href="grafica.htm"><img name="grafica" border="0" src="images/home/lab02.gif" hsrc="images/home/labr02.gif" width="177" height="238"></a></td>
<td height="237"><a href="illustrazioni.htm"><img name="illustrazioni" border="0" src="images/home/lab03.gif" hsrc="images/home/labr03.gif" width="149" height="238"></a></td>
<td height="237"><a href="gallery.htm"><img name="gallery" border="0" src="images/home/lab04.gif" hsrc="images/home/labr04.gif" width="133" height="238"></a></td>
<td height="237"><a href="museo.htm"><img name="museo" border="0" src="images/home/lab05.gif" hsrc="images/home/labr05.gif" width="273" height="238"></a></td>
<td height="237"><a href="fotografia.htm"><img name="fotografia" border="0" src="images/home/lab06.gif" hsrc="images/home/labr06.gif" width="102" height="238"></a></td>
</tr>
<tr>
<td><img src="images/home/lab07.gif" width="138" height="73"></td>
<td><img src="images/home/lab08.gif" width="177" height="73"></td>
<td><img src="images/home/lab09.gif" width="149" height="73"></td>
<td><a href="mailto:michelangeloscamardi@artstation.it"></a><a href="contatti.htm"><img name="lab10" border="0" src="images/home/lab10.gif" hsrc="images/home/labr10.gif" width="133" height="73"></a></td>
<td><img src="images/home/lab11.gif" width="273" height="73"></td>
<td><img src="images/home/lab12.gif" width="102" height="73"></td>
</tr>
</table>
</body>
</html>
[I]Fine commento utilizzato per non interferire con il codice del forum di 001design.it. -->
Scusa se mi permetto di sconsigliare i javascript di Dreamweaver, ma ai miei tempi l'HTML si scriveva con notepad...
Per la spiegazione dettagliata del rollover ti rimando all'originale:
http://www.html.it/mailing/archivio/a224/
001design.it ® è un marchio registrato.
© 2004-2020 Molfese Paolo - P.Iva: 03430820617 - All rights reserved | Tutti i diritti sono riservati.