Computing.Net > Forums > Web Development > Objects moving on web page

Objects moving on web page

Reply to Message Icon

Original Message
Name: floydb
Date: October 14, 2004 at 14:52:58 Pacific
Subject: Objects moving on web page
OS: win XP
CPU/Ram: 850
Comment:

Hi,
When i view my page in a browser that is used at Full Screen it aligns the way I designed, but when i change the window size (Making it Smaller) the items on the page start to overlap each other so they fit in the window. I have scrolling enabled so that when the browser isnt maximized people can use scroll bars to view the page. But I would like to have the objects stay in place when the page size is manipulated..Any Help would be MUCH appreciated...Thanks


Report Offensive Message For Removal


Response Number 1
Name: Don Arnett
Date: October 14, 2004 at 20:50:27 Pacific
Subject: Objects moving on web page
Reply: (edit)

You have to specify the position of objects rather than leaving it up to the browser. One way is to set the top and left attributes on every object, but that is a pain.

The opposite extreme is to put fixed width DIV or TABLE around everything. I havent' done this for a while, so I might not get it exactly right, but the idea is something like:

<BODY>
<DIV style="position:absolute;top:0;left:0;width:800">


all your stuff


</DIV>

That DIV statement created a DIV position at the top of the page with a fixed width of 800pixels. If the browser is narrower than 800, a scrollbar will be added to the bottom of the browser, but the DIV will always be 800 pixels wide (unless I suppose you put something inside that is wider than 800 pixels).

Note that I did not specify the height. The height will be determined by the amount of stuff that you put inside.

If you make the background color of the DIV match the background color of the screen, you won't be able to tell where the boundaries are.


Report Offensive Follow Up For Removal

Response Number 2
Name: floydb
Date: October 17, 2004 at 14:23:02 Pacific
Subject: Objects moving on web page
Reply: (edit)

The "DIV" command worked like a charm....Thanks for all the help the page works great now!!! Thanks again...


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Objects moving on web page

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge