Cut The Around Of Photo Show Only The Center?

Oct 14, 2010

I used the below code, but it seems not correct.I want cut the around of photo, and show only the center 200*200px, how to modify?

HTML Code:

<div style="width:200px;height:200px;overflow:hidden;background-color:#000;"><img src="http://www.chlorischile.cl/alternanthera/foto6inflorescencia.jpg" width="200"
onload="this.style.backgroundPosition=(200-image.width)/2+'px';this.style.backgroundPosition=(200-image.width)/2+'px';no-repeat;" /></div>

View 2 Replies


ADVERTISEMENT

JQuery :: Photo Slide Show Bug / Fix This?

Oct 18, 2011

I am using some excellent code for a photo slide show from ..

The way this slide show gallery works is there are mulitple list items in an UL and within each list item is an image. sequentially one list item has the class .show and this changes the css of that list item so opaque is set to 1. Making it visible. A timer determines when the list items change so the next list item within the hierarchy has .show. Once is reaches the last list item, it goes back to the first item.

The problem I have with my code is that when the page first loads up, the first image displays briefly before changing to the second image. After this happens, the slide show behaves correctly.

In bold are the the important lines of code. First I use jquery to assign .class to first list item. The second line of code in bold is a conditional statement. If no image has .show, assign it to the first list item. This is when the code doesn't work as intended.code...

View 1 Replies View Related

JQuery :: Create An Overlay To Show A Photo In The Middle Of The Screen?

Dec 19, 2011

I want to create an overlay to show a photo in the middle of the screen with a navigation menu. As overlay I use something like:

.overlay {
position: absolute;
top: 0;
left: 0;

[Code].....

View 2 Replies View Related

Photo Gallery - Show Full Screen Image When Thumbnail Is Clicked?

Dec 16, 2009

I have a page, which is actually a photo gallery with a table having 3 rows. First row shows the full screen size pic. Second row displays the Caption of that image and third row shows thumbnail view of six different images and the previous and next button.this is the sample layout:

<table>
<tr>
<td colspan=8>

[code]...

My requirement is whenever the user click on the thumbnail view, which is in the 3rd row, the corresponding full screen size pic should open in 1st row of the table.As my photo gallery should be having more than 6 pics, lets take 20 pics, I want to show only 6 thumbnails in 3rd row at a time. Whenever user press "Next" button the 3rd row having 6 thumbnails should show other 6 thumbnails and previous button should show previous 6 thumbnails.

View 10 Replies View Related

Show/Hide - In FF, The Mouseover Hand Shows As The Mouse Passes Over The Center Of The Image But The Apple Does Not Display?

Apr 24, 2009

For simplicity and debugging, I attempt to display an apple when the mouse passes over the center of an image.In IE, the mouseover hand shows as the mouse passes over the center of the image and the apple is displayed.In FF, the mouseover hand shows as the mouse passes over the center of the image but the apple does not display.(By the way, I'm certain the showhide function is fine,

<div id="Core" style="position:absolute; width:209px; height:115px; z-index:4; top:212px; left:28px; visibility: hidden"><font color="#000000"><img src="apple.jpg" width="125" height="140"></font></div>[code]....

View 3 Replies View Related

Photo 1 Is Shown For A Little While, Then It Switches To Photo 2?

Apr 28, 2010

I would like to have a code on my page that causes two or more photos to change between each other. For example, photo 1 is shown for a little while, then it switches to photo 2, etc. I would also like to switch text that goes along with the photos. I would like my layout to look like this:Photo / Text about Photoand have both switch after a little while, to the next photo and text.

View 5 Replies View Related

How To Center A Prompt Box??

Jul 23, 2005

I am trying to make a prompt that will ask the user for some input...
If I just use var input = prompt("dafa") everything works fine but the
box is put in the top left corner of the window. I need it to be
centered so... I was doing some research on the net (never really used
much JavaScript before) and was reading the only way to do this is by
making your own custom prompt. In my attempts of doing so I came up
with this code below. The problem I am having now is that when
onMaxLoad_Click() occurs the prompt appears for a split second and then
it goes back to being hidden. Code:

View 7 Replies View Related

Center Alignment

Jul 23, 2005

Suppose one wants to write some text in the web page which needs to be
center aligned, then how to do it?

The command for writing some text is as follows if I am correct:

document.write('This is some text');

What needs to be done to write the above text with center alignment? Can
some one give me the syntax?

View 2 Replies View Related

Center A New Window

Mar 3, 2006

I want to center a new window that opens. Current code:

<a href="javascript:void(0)" onclick="window.open('./dilbert.html','Dilbert','height=250, width=800,scrollbars=no')">Dilbert</a>
How can I center the new window this creates?

View 7 Replies View Related

Center Pop Up Window

Jan 17, 2003

I am using the perfect pop up window script from this site and I want to edit it so the window pops up in the center of the screen om all screen resoultions. At the moment the pop up in some case is half off the screen which is annoying.

var newWin = null;function popUp(strURL, strType, strHeight, strWidth) { if (newWin != null && !newWin.closed) newWin.close(); var strOptions=""; if (strType=="console") strOptions="resizable,scrollbars,height="+ strHeight+",width="+strWidth; if (strType=="fixed") strOptions="status,height,scrollbars,="+ strHeight+",width="+strWidth; if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,"+ "resizable,location,height="+ strHeight+",width="+strWidth; newWin = window.open(strURL, 'newWin', strOptions); newWin.focus();}

><a href="link.htm" onclick="popUp(this.href,'console',500,300);return false;" target="_blank">

View 3 Replies View Related

Photo Slider II

Dec 22, 2006

How can I have it keep the photos in their original proportions. All photos are under 640 x 480 though not all the same size. When they are viewed in the slider the are streteched to the 640 x 480 regardless of their original size.

View 2 Replies View Related

Photo Album

Oct 20, 2003

Here is a photo album I've made up. I made it primarily for a photo album on your harddisk/a CD, but it would probably work for the internet aswell.

View 5 Replies View Related

Photo Scrollbar??

Sep 18, 2002

I am trying to make a webpage and there is something that I want on it, however, I have no idea how to get it. I want a scrollbar that has jpegs. I want a person to be able to scroll through thumbnails (in the scrollbar) and click on it and be brought to the link.
Does anyone know of a script that I can get that will do that? I know nothing about writing scripts.

View 11 Replies View Related

How Do I Center A Div Both Vertically And Horozontally?

Jul 20, 2005

Can somoene give me an example of how to center a div, according to it's
image size... I am using different images, and so I have to resize it in a
functino according to the image's size. So I use a h and w vairable that
give me the height and width of the current image, but I can't seem to come
up with a simple freaking formula to center the image vertically and
horozontally.

fnFullView = function () {
var h
var w
var _tempImg = new Image()
_tempImg. () {
_tempImg.src = this.src
h = this.height
w = this.width
}
_tempImg.src = arPhotolog[currIndex].full

_picGalImage.resizeTo(w,h)
_picGalImage.swapImage(_tempImg.src)
_picGalImage.show()
}

This is the function I am working on, but it really doesn't matter how I do
it.

View 4 Replies View Related

JQuery :: Ways To Center A Div Within A Div?

Jul 26, 2011

I want to get some idea of what methods there are to center a div element.If you know a cool method please show us how it's done using this jsfiddle dummy to start

View 16 Replies View Related

Center A Drop Down Menu?

Sep 30, 2010

I want to center a javascript and CSS horizontal dropdown menu, How do I centre the bar I am using the stylesheet. [url]

View 3 Replies View Related

Center Horizontal Scroll Bar

Mar 5, 2005

This works for me with IE 6.0

<html>
<body onload="scrollBy((document.body['scrollWidth'] - 1010) / 2, 0)">
<table width="500" border="1" align="center">
<tr>
<td align="center">1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 6 6 6 6 6 7 7 7 7 7 8 8 8 8 8 9 9 9 9 9 | 9 9 9 9 9 8 8 8 8 8 7 7 7 7 7 6 6 6 6 6 5 5 5 5 5 4 4 4 4 4 3 3 3 3 3 2 2 2 2 2 1 1 1 1 1</td></td>
</tr>
</table>
</body>
</html>

The numbers in the table are just to keep track of how centered the horizontal scroll bar is. Mess around with the table width; Change it to 100 or to 10000. The numbers stay aligned perfectly.

Anyone have any problems with different browsers?

View 2 Replies View Related

Center Dynamic Content

Oct 16, 2006

I need to center (horizontally as well as vertically) a div on screen. It will be in front of everything else on the page and will include dynamic HTML content. (radio buttons, text input, etc.) Essentially it's an in-page popup. (Don't call me evil, this is for a game I'm making.) So far I can get FF to center it with this code:

function ShowBox(str,MsgBox){
MsgBox.innerHTML = str;

var style = gStyle(MsgBox,null);
var h = parseFloat(style.height);
var w = parseFloat(style.width);

MsgBox.style.left = (gWinWidth() - w) / 2 + "px";
MsgBox.style.top = (gWinHeight() - h) / 2 + "px";


MsgBox.style.display = "block";
}


Where gStyle is a cross-browser alias for getComputedStyle, str is the message I want displayed in the box, and MsgBox is the div that acts as the popup. Code:

View 2 Replies View Related

Center Popup From C# Code?

Jun 8, 2010

I'm working on pop up screen which has protected void btnAdd_Click(object sender, EventArgs e){

btnAdd.Attributes.Add("onclick", "window.open('add_Employee.aspx','mywindow','menubar=1,top=300,left=300,resizable=1,width=400,height=250'); return false; ");
}

but i want the pop to be in middle of the screen in all screen resolutions

View 1 Replies View Related

Center An Open Window

Apr 12, 2006

Is there a way to center a window that is already open using javascript?

I have seen many scripts on how to center the window when it is poped up ... but nothing using the DOM to center it when it is open already ..

View 2 Replies View Related

How To Center A Website Not The Usual Css

Sep 17, 2011

I have written a short script that checks if a user has a screen rez lower than 1025 (so that the ipad is included) if it is bigger than 1025 then it centres a div according to the screen size.

<script type="text/javascript">
if ((screen.width<=1025)) {
alert("Mobile device!");

[code]....

change 1000 to your screen size and add a div with the ID:'page'

View 3 Replies View Related

CSS MENU And CSS Photo Gallery

Feb 19, 2006

I have put on my site a photo gallery and at the right a nav menu. This
menu has a red dot visible want someone is passing over one item or
clickong one item.

I want to make two things in this page (the sameone
http://www.danieldesjardins.com/gallery/1202015) so it would be like a
want. If you can help a would appriciate. I'm a beginner i copy CSS
from exemple and put them in my page... But whent it comes to do simple
more with it ...i'm very limited.

The first thing is how can a get ride of the selection borber around
the photo a have clicked.

The second thing is : every photo is from from one itme of my nav menu
at the right. This menu as a When someboby select a picture in the
gallery, i would like to get the corresponding item menu hover a the
same time.

The third is ... i want to put the clickable mini photo under the big
photo......

View 1 Replies View Related

Photo Gallery Code Help

Sep 9, 2007

I'm not sure if this is the right group to post in. If it is not,
please let me know where I should be posting.

I have been looking all over the internet for free javascript code for
a photo gallery that has the following features. Do you know where I
can find this?

1. Allows you to use different size photos
2. lets you put a few lines of text under the photo
3. Has navigation arrows (left and right)

View 2 Replies View Related

JQuery :: Photo Rotator - How To Add More Than One

Nov 1, 2010

I used the code here for my photo rotator: [URL]. It works when there's one rotator on the page, but I need to add a few and that does not work.
function theRotator() {
//Set the opacity of all images to 0
$('.photos img').css({opacity: 0.0});
//Get the first image and display it (gets set to full opacity)
$('.photos img:first').css({opacity: 1.0});
//Call the rotator function to run the slideshow, 4000 = change to next image after 4 seconds
setInterval('rotate()',4000);
} function rotate() {
//Get the first image
var current = ($('.photos img.show')? $('.photos img.show') : $('.photos img:first'));
var currentButton = ($('.photos a.active')? $('.photos a.active') : $('.photos a:first'));
//Get next image, when it reaches the end, rotate it back to the first image
var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('.photos img:first') :current.next()) : $('.photos img:first'));
var nextButton = ((currentButton.next().length) ? ((currentButton.next().hasClass('active')) ? $('.photos a:first') :currentButton.next()) : $('.photos a:first'));
//Set the fade in effect for the next image, the show class has higher z-index
next.css({opacity: 0.0})
.addClass('show')
.animate({opacity: 1.0}, 1000);
nextButton.addClass('active');
//Hide the current image
current.animate({opacity: 0.0}, 1000)
.removeClass('show');
currentButton.removeClass('active');
};
$(document).ready(function() {
//Load the slideshow
theRotator();});

View 1 Replies View Related

Change Photo On Check?

Apr 19, 2010

how can user change the photo on the same page

my code is

<body>
<img src="photo1.cgi" style="cursor:move" align="left"/></div></th><br />
<a href="photo1.cgi" >photo1.cgi</a><br />
<a href="photo2.cgi" >photo2.cgi</a><br />

[Code]....

View 1 Replies View Related

How To Make A Photo Effects?

May 6, 2009

i want to know how to make a photo effects like the one in this site http:[url].... in the downleft corner press next or previous & see the effect of fadding.

View 1 Replies View Related







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