DIV width differences in different browsers

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
mzfp2
Forum Contributor
Posts: 137
Joined: Mon Nov 11, 2002 9:44 am
Location: UK
Contact:

DIV width differences in different browsers

Post by mzfp2 »

Hi,

Im using the DIV element to create a scrollable region in my site, I have specified a fixed width of 430px, this eppears ok IE, however in Mozilla Firefox it appears to take more physical width, which is interfering with the reso of the site design.

I was wondering if there was any way to unify the width or spacing between the two browsers?

Many thanks
Musaffar
zenabi
Forum Commoner
Posts: 84
Joined: Mon Sep 08, 2003 5:26 am
Location: UK

Post by zenabi »

Could you post your code or a url to a working example?
mzfp2
Forum Contributor
Posts: 137
Joined: Mon Nov 11, 2002 9:44 am
Location: UK
Contact:

Post by mzfp2 »

The following url best illustrates the problem, when viewed in the two differerent browsers the layer width has large difference in width :

http://www.lensbase.com/search.php?xSea ... mit=Search
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

i would recommend adding a doctype declaration, which will make ie and gecko browsers behave more alike.
i know ie and gecko browser display widths (because of padding) differently.
You might try setting padding to 0px and adding some margin and wrapping it on another div to avoid the padding problem
Post Reply