I recently faced an issue, where the buttons of my application
were getting cut off (hiding from the right side) in the page layout on
resizing the Portal browser window. I tried to fiddle around with the width field
in my html/jsp page but somehow the changes never worked inside the Portal Page Layout. I had 2 options,either to fix my layout so that it doesn’t shrink at all or to make my buttons resizable on window resize.
I implemented the other approach i.e
to make the buttons shrink to fit the window screen resize using a simple
on the onresize event within
both and tag. The button submit functionality can be implemented on the onClick event of the .
works well but in case of using a button inside a table, you might need to
tweak around with html tags so that the layout is proper+.
window_height = document.body.clientHeight;
image_width = document.images.width;
image_height = document.images.height;
height_ratio = image_height /
width_ratio = image_width /
(height_ratio > width_ratio)
+/* As I have multiple img buttons I used a for loop