Border on my popup

This is a discussion on "Border on my popup" within the Web Page Design section. This forum, and the thread "Border on my popup are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 15th, 2008, 20:22
New Member
Join Date: Sep 2007
Location: London
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Border on my popup

Hello People

I am having some problems with a pop up window I am trying to create, i am new to Javascript so this has been take from http://www.javascriptkit.com/script/...opimage2.shtml

My problem is the border on the window.

I have resized my image and my pop up window so that it is the correct size, however I am still getting a border around the outside, which is annoying me a lot, however I am not JavaScript smart enough to work out where this border is getting added. I have tried altering my CSS file and I am still getting it.

Any help on the matter would be very very much appreciated.

Thanking everyone in advance for their time

Cameron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 15th, 2008, 21:03
Reputable Member
Join Date: Mar 2008
Location: Chester, UK
Age: 18
Posts: 439
Thanks: 2
Thanked 29 Times in 29 Posts
Re: Border on my popup

Have you got a link to what you've got?

Also where is the border? On all sides, just on the top and left side?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 16th, 2008, 19:02
New Member
Join Date: Sep 2007
Location: London
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Border on my popup

Thank you for the quick response, click the images to see the problem.

As you can see from the link the border is at the top an the left, if I alter the size of the pop up window to be fine in Mozilla then it is wrong in IE and so on, but in a ideal world I would like to have zero border / margin / padding.

http://www.csr500.co.uk/websites/cape/alexis.html

Thank you for you time

Cameron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 16th, 2008, 19:12
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: Border on my popup

You may be better off implementing this using lightbox. To be honest pop up windows are annoying.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 16th, 2008, 19:47
Reputable Member
Join Date: Mar 2008
Location: Chester, UK
Age: 18
Posts: 439
Thanks: 2
Thanked 29 Times in 29 Posts
Re: Border on my popup

i agree with moojoo, but for the method you're using


Code: Select all
// JK Pop up image viewer script- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com)
// for free JavaScript tutorials and scripts
// This notice must stay intact for use

var popbackground="lightskyblue" //specify backcolor or background image for pop window
var windowtitle="Image Window"  //pop window title

function detectexist(obj){
return (typeof obj !="undefined")
}

function jkpopimage(imgpath, popwidth, popheight, textdescription){

function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}

getpos()
var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
if (typeof jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
//getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too
//jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth, popheight+30)
}
jkpopwin.document.open()
jkpopwin.document.write('<html><head><title>'+windowtitle+'</title><style type="text/css">*{margin: 0; padding: 0; border: 0;}</style></head><body '+bodyattribute+'><img src="'+imgpath+'" style="margin-bottom: 0.5em"><br />'+textdescription+'</body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}
That'll fix it.

I've added a few settings in the popup to reset the browsers default settings

Last edited by Bocaj; Jul 16th, 2008 at 20:00.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jul 17th, 2008, 19:37
New Member
Join Date: Sep 2007
Location: London
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Border on my popup

Thank you both very much for your help.

I have gone down the lightbox route, i will post the results when I have finished.

Once again thank you

Cameron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with border-right in FF danny322 Web Page Design 9 Dec 6th, 2007 10:04
how to make the border be red checkmate Web Page Design 17 Oct 29th, 2007 07:47
CSS border styling RZX Developer Web Page Design 6 Aug 10th, 2007 14:25
Why only one border? timmytots Web Page Design 1 Nov 30th, 2005 21:32


All times are GMT. The time now is 18:14.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42