Dynamo
4 replies to this thread. Most Recent
zacbest
29 May 2008, 10:14 pm
Webyep Image Center
When using Webyep image action, how is it possible to always have the image centered?
I want to set a space for the client to upload a photo, but the photo may vary from landscape to portrait. I need the image always to be centered, even when it is portrait.
Is this done through the HTM attributes?
All help much appreciated.
zacbest
29 May 2008, 10:24 pmworked it out - just applied a style to it with paragraph aligned in the center.
zacbest
29 May 2008, 11:04 pmAnother problem: when using the following code as supplied by Max:
<script type="text/javascript">
function openNewWindow()
{
window.open("", "MyNewWindow", "width=500,height=600");
}
</script>
How can i get the popup window to be centered on the screen?
Tim Plumb
30 May 2008, 2:09 amChange the function for something like this;
<script language="javascript"> var win = null; function openNewWindow(mypage,myname,w,h){ LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+'; win = window.open(mypage,myname,settings); } </script>and call it with something like; Sample Link Regards, Tim.
Quoting zacbest
<script type="text/javascript"> > function openNewWindow() > { > window.open("", "MyNewWindow", "width=500,height=600"); > } > </script>Another problem: when using the following code as supplied by Max:
How can i get the popup window to be centered on the screen?
Extend Freeway the way you want with FreewayActions.com www.freewayactions.com
max
30 May 2008, 6:33 amHI Zac This is the instructions on how to centre vertically and horizontally.
To get the image to be in the center of your work:
Draw an webyep image the size you need, then adjust the width and height to fixed inside the image action palette, then placed this item as an inline in the middle of a 1 row 1 column table then create a style with these attributes: (the first is an added via the extended button)
vertical-align: middle
and a pargraph attribut of:
align: center
and then apply it to the table
Now regardless of size or proportion the image sits in the middle of its block of colour
<script type="text/javascript">
function openNewWindow()
{
var width = 500;
var height = 600;
popup = window.open("", "MyNewWindow", "width=" + width + ",height=" + height);
popup.moveTo((window.screen.availWidth - width) / 2, (window.screen.availHeight - height) / 2);
}
</script>
I will send you the example and the code to your email address
speak soon max
it’s better to be lucky than clever.. :o)