Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 2nd, 2006, 08:40 PM
Authorized User
 
Join Date: Oct 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default ie problem

I have a problem with divs in firefox and ie.

the size the divs have to cover is 800px.

The amout of divs that sits in this space is determined by the number of options which varies from 1 - 10

so first i work out the size of one div by

menuIndSize = 800 / mmItems

mmItems is the number of divs that is required..

so within a loop i have the code

Code:
<div class="menuItem2"  style="width:<%=cdbl(menuIndSize )%>px; background-color:<%=bgcolour%>;"><%=rsMainMenu("Section_Name")%> </div>
In Firefox it always work perfectly in ie it doesnt....

in ie if for example the items is 4 or 5 it works as

800 / 4 = 200 and 200 is a whole number

but if there are only 3 menu options for example

800 / 3 = 266.666666666667 and this isnt a whole number it doesnt work

as i said this work perfectly in firefox but in ie its 2 pixels short..

what can i do??
 
Old November 3rd, 2006, 09:26 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I am kinda suprised that FF reads doubles as valid numbers for element sizes. Anyway. Its a browser limitiation (obviously) and there isn't anything that you reall can do, you can try rounding the number but you will probably wind up expanding the divs beyond 800 pix.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.