Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping DIVs under control

Status
Not open for further replies.

Tama

MIS
Jun 6, 2001
121
NZ
Site: Problem:
I've been mucking around with DIVs and I would like some advice. The idea for a section of my site is that people can mouse over different sections of a map and it will tell them stuff about the relevant map area.

I've split my main screen into two sections using a table and stuck up the map in the right hand cell. I've then set up a bit of code that flicks between DIVs as the person mouses across the maps. I even worked out how to make the DIV resize in relation to the window (cross fingers - I still have to test this on large resolution monitors.)

But... If the user does something like enlarge the default text size (perhaps they have a reading disability or really like reading gigantic text) the text in the DIV expands downwards - past the footer of my page and into the gray back ground colour.

As a discipline thing I'm trying to figure out a way to stop this from happening. I don't mind if the rest of my page (ie the right cell with the map in it) stretches vertically and pushes the footer down. I just want to stop the enlarged text from mucking into the footer.

I've uploaded the page to my site at so you can have a look. Because it's only in the test phase you'll only get a DIV swap if you mouse over the bottom of the top island (A ALT tag with "Wellington" on it should pop up.)

Just as a note - I only bother testing on IE, so I'm not sure how Netscape would handle any of this.

Cheers
Tama
 
As far as the size goes, use css to control the text size. It will always over ride accessibility options.

.stay { font-size: 16px }

Use <p class=&quot;stay&quot;> for the text you don't want changed. DeZiner
gear.gif width=45 align=left
When the gears stop turning,
we all stop learning.
 
Thanks DeZiner - I thought of doing a CSS font size over-ride. I might go for it if I can't find a way to keep the page flexible. (I work for a library and try and keep accessibility options open as a matter of principal / good habits / maschoism.)

I did have one thought that might work. If there was any way of measuring the height of a cell/DIV (thru DOM?) I could add another cell under the map which could resize itself in relation to the height of the DIV...

Might give this a crack tonight.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top