Border Around Image

Jul 23, 2005

When I use this code....

window.open('gallery/pic1.jpg','windowname','width=775,height=550,resiz able=yes,scrollbars=yes,top=10,left=10');

....my web page displays a picture with a white border around it. Is there a
way to get rid of the white border? I want to continue to link directly to
my image (pic1.jpg) and not to an HTML page. The reason for this is because
if I link directly to an HTML page then I seem to have problems with pop-up
blockers.

View 1 Replies


ADVERTISEMENT

Identifying Elements That Call A Function - Change The Border Of Several Images On The Page To Show A 4px Border

Feb 26, 2009

What I want to do is change the border of several images on the page to show a 4px border. There are many images on the page so I just want to call the changeborder() function on the onClick event so as the image that has been clicked changes. However, I don't think using this.style.border to identify the element works when placed within the function. That is, how do I identify, from the function, which image has been clicked? My current code (which does not work) looks like this but I am sure its possible to gather what i'm trying to achieve:

<script type="text/javascript">
function changeborder()
{
this.style.border='4px solid red'
}
</script>
<img style="border: 1px solid #F4F4F4;" onclick="changeborder()" src="images/colours/010.jpg" border="0">

View 1 Replies View Related

Repeat Image For Border

Mar 11, 2007

Can someone point me to some resources on how to tile an image to create a
border?

<td><img src="images/MTile.png" width="1" height="30" alt=""></td>

I have something like that where I need to repeat x times where x depends on
the width of the browser. (Not sure if its a good idea to use a bitmap of
width 1 but I could use one that is larger and then use both(e.g., maybe one
that is 10 pixels wide and repeat that as needed and let the 1 pixel wide
one get the rest(I have some "ends" on the border that I need to display too
so it sorta needs to be exact))

Not sure how to do this with js(just learning it) but obviously I just need
to get the width of the border and then figure out how many times I need to
repeat the code.

I have several issues I am wondering about though. First off is that I have
used photoshop imageready to create a roll over menu bar but in firefox when
I use the down state it leaves a selection rectangle around the image but in
IE it does not do this. It does not look nice in firefox and I'm sure there
is some way to prevent it. (for some reason it selects it when you click the
menu item and this probably can be turned off using css?)

Another issue, which isn't a big deal, is that I'm using symmetric bitmaps
to "cap" the border. I was wondering if it is possible to flip the image
using html or js so that I don't have to have a seperate image for it?

View 7 Replies View Related

Swap Image With A 1px Border?

Apr 3, 2011

Below is the routine I am using that when invoked swaps images for other images:

<script>
function swapImage(swapContName) {
if (swapContName == 'mainImage1') {

[code]....

But one of the images I would like to vanish (using the empty spacer.gif) has a border:

<img id="instructflag" border="1" src="FLAG.gif" width="23" height="15" align="left">

It must have this black border, but when it gets swapped for a blank, I am left with the black square. how to vanish the border along with the graphic?(I have some vague idea that "border" is not used any more, but anyway...).

View 3 Replies View Related

Detect If Mouse Is Over The Border Table And Over Cell Border?

Jan 7, 2009

is there a way how to detect if mouse is over the border table and over cell border? and if yes, when user click and host button and move mouse cursor (to increase cell width) which event should i detect ?

View 1 Replies View Related

Way To Change Border Of Image On OnClick

Jun 3, 2011

I am trying to add a border around the base they select and then when they select another one, I want the previous one to go away and then high light that one.This is my PHP code that outputs the bases:

$gender = $_GET['gender'];
// SQL Injection here?
$sql = "SELECT * FROM habases WHERE gender='".$gender."'";

[code]....

View 5 Replies View Related

How To Change Border Around Image Rotation

Jan 11, 2011

I am making a website and I have image rotation written in javascript and atm I am trying to change the boarder around my image rotation because right now the boarder is purple but nothing I do seams to work so. Here is my code
<a href="Page2.html"><img id="r1" src="images/Pro-Tech Antivirus Cover.jpg" alt="" border="5"></a>
Its all defined and everything I just need to no how to change the border so its not purple. I want it to be dark cyan?

View 7 Replies View Related

Strange Border Appears In Js Image Flip

Jul 3, 2003

I'm creating a tabbed menu navigation for a site. I'm using javascript to to give the tabs a mouseover effect. I also have a function that decides whether the tab has been selected or deselected by the user, and uses that info to determine which image file to use in the img swap.

The page works fine in IE 6, however in Netscape 6.2, when I mouseover the tabs, a thin border quickly flashes around each image as it swaps. It looks like the placeholder that's displayed for a broken image in IE, only with only the border and no red "x". I'm not sure why this is happening, as all the images have been preloaded.

The markup is XHTML 1.0 Transitional. Here's the js I'm using:

View 1 Replies View Related

Highlight Image - Click On Another Row The First Border That Changed Obviously Changes Back

Aug 27, 2010

I have say 12 pics on a page, in 3 rows of 4. The rows of pics are there so that a choice can be made from each row and I'm using a function <script>

var highlight_color = '#FF0033'; function toggle_highlight(id) { var images = document.getElementsByTagName('img'); for (var i = 0; i < images.length; i++) { var image = images[i]; image.style.borderColor = image.id == id ? highlight_color : 'white'; } } </script>

to toggle a border colour change so that you can see what was chosen from each row. The function I have used is fine in that it works, but I can only choose one picture and have the border changed, then if I click on another row the first border that changed obviously changes back and the new selection is highlighted. I don't really know where to go from here.

View 2 Replies View Related

Top And Bottom Background Colors As The Above Image - Border Color Same As Top Background Color

Aug 24, 2010

provide javascript to create something like the image below: Things I can't workout are:

1. top and bottom background colors as the above image
2. add two text
3. border color same as top background color

[Code]....

View 1 Replies View Related

Put A Border Around An Input Box?

Dec 26, 2011

how do i put a red border around an input box with a class of .input1 if it goes into this loop??

if(firstName=='' || firstName.length < 3 || firstName=='First Name:' ){
error = 'Please enter your first name';
$j('#errormsg').html('<p class="errors">'+ error +'</p>');
return false;
}

View 3 Replies View Related

Equiv Of Border=1 In Table

Sep 4, 2006

Wondered if you could let me know if I've missed something when setting up a
table.

If I use the following:

<TABLE WIDTH=500 BORDER=1>
<TR><TD>fred</TD></TR>
<TR><TD>fred</TD></TR>
<TR><TD>fred</TD></TR>
<TR><TD>fred</TD></TR>
</TABLE>

All 4 sides of all of 4 table cells have a border 1 pixel in depth -
perfect!

If I change this to:

<TABLE WIDTH=500 STYLE="border: 1px dashed black">
<TR><TD>fred</TD></TR>
<TR><TD>fred</TD></TR>
<TR><TD>fred</TD></TR>
<TR><TD>fred</TD></TR>
</TABLE>

I only get a border on the outer 'wall' of the table - no borders on the
cells!!!

Due to the project I'm working on, I'm dynamically creating rows and cols in
DOM, I'd really like to just specify that all of the cols/rows have a border
in one go like the old table method rather than having to define the border
style for each cell.

I can't use the old table method of BORDER=1 because I need the dashed style
rather than a solid border. Any ideas on how I can do this?

View 3 Replies View Related

How To Remove A Border Style Under IE?

Dec 8, 2006

I have the following problem:

An input field get a border assigned by a style class (e.g. 2px solid red).
When the field gets the focus, we set the border to green.

element.style.border = "2px solid green";

When the field looses the focus, the border should change back to red.
We just want to remove the style we have set, when the field has got the
focus, so that the style class is visible again.

element.style.border = "";

Under Firefox that works but not under IE.
We have changed to the class mode, because we don't want to save the
previous setting and restore it later.

Is there a possibility to remove the style (especially the border style)
under IE, so that the style of the assigned class is visible again?

element.style.removeAttribute doesn't seem to work, but may be I make
something wrong? Code:

View 1 Replies View Related

JQuery :: Getting Rid Of Border Around Img Link (IE 8)?

Oct 12, 2011

've been grinding this for days and nothing seems to work. I'm using a JQuery script (or a variant) called the bx.Slider [URL].. It works well. It's all positioned properly. I use my own prev/next images, and there is the ugly blue border around them in IE 8 only. I've tried removing the border, both in the js file (jquery.bxSlider.min.js), in my own syle sheets where you can style the js created classes, or inline, in the tags themselves... None have worked in any way, shape or form.

Maybe I am looking in the wrong places, but I can't seem to find the answer. Does anyone know of a trick or two regarding this?

View 3 Replies View Related

Putting A Border On DOM Tablerow?

Jun 2, 2011

I am using DOM table insertrow as such:

Code:

var _table = document.getElementById("TableList").insertRow(0);
_table.border = 1;
var cell0 = _table.insertCell(0);
var cell1 = _table.insertCell(1);

[Code]....

but it does not seem to work. how to get a border on the individual row?

View 1 Replies View Related

Pop Up Window Size And Border

Jan 19, 2006

I am using Dreamweaver to open a pop up window when you click in a thundnail to make the picture bigger. In Dreamweaver you have the option to specify the dimensions of the pop up window(in my case the same as the photograph). It seems to work fine in Explorer, but Safari leaves a white border along the right and bottom edges(aprox 14 pix). I have tried to do the window smaller but then in other browsers you need scroll bars. I would like the new window be exactly the same size of the photograph. Is there any easy way to control this?

View 3 Replies View Related

Change Link Border With Js?

Aug 26, 2009

I need to set the border width of a link when it is clicked. The link calls a javascript and so I need a way to identify which link has been clicked, hence the outline...i tried this.style.borderWidth = 'thin';but to no avail...?!I have already assigned border-color and border-style in the style sheet if that makes any difference...

View 1 Replies View Related

When The Link Is Clicked, Want It To Get A Border Around It?

Nov 4, 2009

I have a link, which triggers a script, but when the link is clicked, i want it to get a border around it... currently tried onclick="this.style.borderWidth = 1px"

View 4 Replies View Related

Div Border Effect Width JS?

Feb 4, 2010

i need make effect on div see image.

On the image we have two border top and under and borer have effect. i wish make this effect width javascript.

how get this effect ?

View 3 Replies View Related

Border Around Tr Not Totally Filled?

Jul 20, 2010

I'm developing a search feature to the following website: REMOVED THE LINK As you can see, the table has a mouseover effect that paints the current hovered row's border. Because I couldn't find any way of drawing a border around the tr only, I had to set all <td> borders white and after that set the top and bottom borders of all <td>'s pink. The first td is set to left border pink and the last one of the row receives right border pink. This is done in jquery's mouseover event. The problem is the border is no continuous, as you can see in the attached image. And that's pissing off my client. Do you have a solution? I've used padding: 0; border collapse.. I don't know what else to do.

View 3 Replies View Related

Change Border Property By ID

Feb 6, 2006

I am working on creating a simple image gallery. I have added styling around the thumbnail images (border and padding). I would like to change the border color when the item is hovered over. I know this can be done rather easily with the getElementById command. Can someone help me understand this process? Here's a snippet of the list that I am working with...

Here's the CSS:

ul {
padding:0;
margin:0;
position:relative;
}
li {
float:left;
padding:0 .5em .3em .5em;
list-style:none;
}
#gallery {
list-style:none;
}
#gallery li {
display:inline;
}
#gallery li a img {
border:1px solid #ccc;
padding:3px;
}

Here's the HTML:

<ul id="gallery">
<li><a href="path/to/image/large/" title="title/of/image/"><img src="path/to/image/thumb/" alt="title/of/image/" /></a></li>
<li><a href="path/to/image/large/" title="title/of/image/"><img src="path/to/image/thumb/" alt="title/of/image/" /></a></li>
<li><a href="path/to/image/large/" title="title/of/image/"><img src="path/to/image/thumb/" alt="title/of/image/" /></a></li>
</ul>
I would like to change the border color from #ccc to #3455ef when the item is hovered over, and ideally have a different style when the item is clicked (or active).

View 3 Replies View Related

JQuery :: Add A Border Of An Element?

Aug 14, 2010

...I have an element (for example <div>) that i displayed in my browser is overflowed and overflow is hidden.Now after displaying browser when I move my mouse over to it, I want to add a border to the <div> using jQuery Code:.css("border","2px solid red"). But the problem is::: at left side and top side border is added but at bottom and right border not added since these 2 sides overflowed.

View 2 Replies View Related

JQuery :: Getting Border-radius Into IE?

Jan 10, 2011

I've been searching for a way to get border-radius working in Internet Explorer by using JavaScript or a JavaScript library like jQuery. With so many browsers now supporting border-radius, it just seems silly to me that we use all this extra markup just for rounded corners in IE.

View 7 Replies View Related

Remove Frame Border Using Createpopup();

May 24, 2007

I made a popup window with createpopup(). The window has a frame
border around it that is grey. I can't seem to find the code that
would not allow the frame of the popup to show.

I've experimented with this:

this.mypopup.document.frameborder=0;
window.frame=0;

Ultimately, I would like to know if it is possible to get rid of the
frame border on the popup window created from createpopup();

View 1 Replies View Related

Give Individual Cell's A Border?

Jul 20, 2005

I would like to have just the top row cells of a table to have borders - is
this possible/easy? or do I have to make the title row another table?

View 2 Replies View Related

JQuery :: If An Element Has Any Border Color?

Dec 23, 2010

How would that be?something like this?:

if ($(this).(BORDER-COLOR PROPERTY?) == "#990033")
{
alert("Yes, border color is #990033");

[code]....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved