File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to move Background image on resize of window

 
Sapan Shah
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am displaying a background image on a new window having size width=1200,height=600.
On that image i am displaying the data (for eg its length,width,Length Width ratio etc) around the image using java code.
Problem is that when i maximize the window,or reduce the size below 1200x600 the value moves,but the image remains still of size(420x216).
And the image is inside a table

<table width="100%" border="1">
<table width="490" height="220" border="0">
<image>Here is the image i am using</image>
</table>
</table>

Below is the Css i am using

background-image: url("../images/TS1.jpg");
background-repeat: no-repeat;
background-position: 0px 3px;
margin: 0px;
padding: 0px;
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not understanding what the issue is. What do you expect to happen that's not happening?
 
Sapan Shah
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i resize the window ie maximizing or decreasing the size of the window, the table size also vary according to the size of the window.

What happen : when i decrease the size of the window suppose towards the left,the value also goes to the left but the background image doesn't vary its size.
I excect : what i expect is that image should also resize.

Below is the example.

4.25 is the value and (------) is the image.

<---4.25--->
-------------

After decreasing the size of the window(  is a blank space please ignore it)

<---4.25---> (Value goes towards left side)
 ------------ (But image remains still it doen't compress)
 
Sapan Shah
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i resize the window ie maximizing or decreasing the size of the window, the table size also vary according to the size of the window.

What happen : when i decrease the size of the window suppose towards the left,the value also goes to the left but the background image doesn't vary its size.
I excect : what i expect is that image should also resize.

Below is the example.

4.25 is the value and (------) is the image.

<---4.25--->
-------------

After decreasing the size of the window((blank space); is a blank space please ignore it)

<---4.25---> (Value goes towards left side)
(blank space)------------ (But image remains still it doen't compress)
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why you'd expect the image to change sizes--if you browse the web you'll see this only very rarely.

In any case, you'll have to write some JavaScript, or figure out if that's possible using just CSS (my guess is no, but I've never tried).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic