Blue borders around images???

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Blue borders around images???

Post by jmansa »

I have just recently installed the banner module, and it works just fine, but is it possible to remove the blue border around the banners???

Hope somebody can help!
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Blue borders around images???

Post by tsw »

img {border:0}

basic css..
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Blue borders around images???

Post by jmansa »

Don't think thats the problem.. It is because the image is linkable it automatic creates a blue border around the image... If it has been clicked the border turns red. How do I go about that in CSS, and is there a specific CSS for the banner module?
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Blue borders around images???

Post by Dee »

jmansa wrote: Don't think thats the problem..
It is more like the solution. When an image is used as link most browsers put a border around it if it's not explicitly disabled.
This can be done in the HTML by adding border="0" to the img tag, or with CSS (applied in various ways).

The banner module probably (I'm not familiar with it) doesn't install any CSS, but probably assigns a class to the image (or an element around it, take a look at the html outputted by the module) so you can style it with CSS. If not add your own, for example:

Code: Select all

<div class="banner">{banner param="value"}</div>
and style with

Code: Select all

div.banner img { border: 0; } 
Hope that helps,
Regards,
D
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Blue borders around images???

Post by jmansa »

I couldnt get it to work for me, but I found another solution...

I opened "action.default.php" file from the banner module and changed these lines

Code: Select all

	if( $row['text'] )
	  {
	    $image .= " alt=\"".$row['text']."\" ";
	  }
	else
	  {
	    $image .= " alt=\"banner" \" ";
	  }
to

Code: Select all

	if( $row['text'] )
	  {
	    $image .= " alt=\"".$row['text']."\" style=\"border:0\" ";
	  }
	else
	  {
	    $image .= " alt=\"\" style=\"border:0\" ";
	  }
and vupti... SOLVED.
jorgwata
New Member
New Member
Posts: 4
Joined: Sat Jan 26, 2008 10:07 pm

Re: Blue borders around images???

Post by jorgwata »

Dee wrote:
jmansa wrote: Don't think thats the problem..
It is more like the solution. When an image is used as link most browsers put a border around it if it's not explicitly disabled.
This can be done in the HTML by adding border="0" to the img tag, or with CSS (applied in various ways).

The banner module probably (I'm not familiar with it) doesn't install any CSS, but probably assigns a class to the image (or an element around it, take a look at the html outputted by the module) so you can style it with CSS. If not add your own, for example:

Code: Select all

<div class="banner">{banner param="value"}</div>
and style with

Code: Select all

div.banner img { border: 0; } 
Hope that helps,
Regards,
D
This solution worked like a charm for me! Thank you!
Locked

Return to “Layout and Design (CSS & HTML)”