Log in

View Full Version : Image rollovers w/o Border?



guydebordgame
03-11-2009, 03:38 AM
Hello all, I would much apprechiate the help... I dont know what the problem is, I cant figure out for the life of my why there are still borders on my rollover images. I am working in dreamweaver... This is my code...


body {
background-color: #000;
}
a:link {
text-decoration: none;
border: hidden;
color: #000;
}
a:link,a:visited {
border: hidden;
padding: 1px;
}

A:hover, A:active {color: #fff}

A:hover
a {
font-size: 0px;
}
a:visited {
color: #000; border:hidden
}
a:hover {
color: #000; border:hidden
}
body,td,th {
color: #000;
}
h1 {
font-size: 10px;
color: #000;
border:hidden
}
-->
</style>
<script type="text/javascript">
<!--
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_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.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 bgcolor="#000000" text="#000000" link="#000000" vlink="#000000" alink="#000000" onload="MM_preloadImages('about1.jpg','images2.jpg','author2.jpg','press2.jpg','intro2.jpg')">
<div align="center">
<p><img src="mainidea.jpg" width="688" height="515" /></p>
<blockquote>
<h1><a href="beth.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','about1.jpg',1)"><img src="about2.jpg" name="Image2" width="158" height="48" border="0" id="Image2" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','images2.jpg',1)"><img src="images1.jpg" name="Image3" width="123" height="48" border="0" id="Image3" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','press2.jpg',1)"><img src="press1.jpg" name="Image5" width="105" height="48" border="0" id="Image5" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','author2.jpg',1)"><img src="author1.jpg" name="Image4" width="239" height="48" border="0" id="Image4" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','intro2.jpg',1)"><img src="intro1.jpg" name="Image6" width="339" height="48" border="0px" id="Image6" /></a></h1>
</blockquote>
</div>



Any help would be greatly appreciated. Thanks

bluewalrus
03-11-2009, 04:34 AM
Where did you get this code from?

Anyway adding this to the css should stop the problem you want.


a img {
border:none;
}
a:hover img {
border:none;
}

guydebordgame
03-11-2009, 04:53 AM
arrr, still not working! I got the code from dreamweaver and some random CSS forums... this is so strange... it doesnt apply a border to regular image links... just buttons..

bluewalrus
03-11-2009, 05:05 AM
link?

guydebordgame
03-11-2009, 05:12 AM
thanks so much for your help.

Heres the link. (http://thehumanpixel.com/main.html)

bluewalrus
03-11-2009, 05:15 AM
What browser is the border showing in? I'm not seeing it in flock. Its the bottom 5 words in boxes right that the border is suppose to be showing on?

This is what i see on hover (mouseover). No extra border.

guydebordgame
03-11-2009, 05:19 AM
Im using firefox, but the borders show up around the text in safari as well...I dont have flock...

guydebordgame
03-11-2009, 05:20 AM
What browser is the border showing in? I'm not seeing it in flock. Its the bottom 5 words in boxes right that the border is suppose to be showing on?

This is what i see on hover (mouseover). No extra border.

On the image you attached there still is a border... I want the text images to be just black with no square around them

bluewalrus
03-11-2009, 05:26 AM
I see the same thing in all three browsers do you not want it to get brighter?


from:http://thehumanpixel.com/about2.jpg
to:http://thehumanpixel.com/about1.jpg

this is what i see:
http://www.screentoaster.com/watch/stV0xdQ0VLRl9YRFRcUlJd/i_see

guydebordgame
03-11-2009, 05:39 AM
yeah, that is what I see as well. I dont want any boarder at all. I would like the links the blend into the black background without a box around them... is that possible?

Snookerman
03-11-2009, 07:47 AM
Those are not borders, the images look like that. Open them in an image editing program and remove the edges.

Good luck!

jscheuer1
03-11-2009, 07:55 AM
The outlines/borders around each image are not from css. The images themselves each have outlines/borders as part of the image. To remove the outlines/borders, each image would need to be edited in an image editing program.