473,666 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE randomly ignoring top-margin, left-margin of DIV style

G'day,

I am using CSS to construct bar charts from nested DIVs. In general this
works fine. However, in certain circumstances I need to display multiple
charts inline. To get consistent results on IE and Moz I wrap each chart in
a <TABLE style="display: inline">. Unfortunately, IE ignores the top-margin
and left-margin properties of a few of the charts, which end up in the top
left corner of the page. The charts that get this treatment depends on the
size of browser window.

The problem goes away if I use display: block instead of display: inline
but for my purposes I need the charts displayed inline.

The problem occurs for IE6 on Win2K and WinXP. There is no problem with
Mozilla 1.7.3 (on RHL9).

Attached is an example HTML document that illustrates the problem and an
image of the results for IE6.

Here's the style:

div {
box-sizing: border-box;
-moz-box-sizing: border-box
}
..histogram {
background-color: #ded;
text-align: left
}
..histogram .title {
font-weight: bold;
font-size: large;
position: absolute;
text-align: center
}
..histogram .legend {
line-height: 24px;
position: absolute
}
..histogram .x_axis {
position: absolute
}
..histogram .y_axis {
position: absolute
}
..histogram .bars {
position: absolute
}
..histogram .bars .bar {
border-right: #000 1px solid;
border-top: #000 1px solid;
background: #8888ff;
border-left: #000 1px solid;
border-bottom: #000 1px solid;
position: absolute
}
..histogram .bars .block {
position: absolute;
background-color: #cdc
}
..histogram .axis {
font-size: 12px;
white-space: nowrap
}
..histogram .label {
font-weight: bold
}
..histogram .x_axis .label {
position: absolute;
text-align: center
}
..histogram .x_axis .value {
position: absolute;
writing-mode: tb-rl;
text-align: left
}
..histogram .y_axis .label {
position: absolute;
writing-mode: tb-rl;
text-align: center
}
..histogram .y_axis .value {
position: absolute;
text-align: right
}

If you can suggest a workaround/fix I'd really appreciate it.

Thanks,
Chris.
Jul 20 '05 #1
1 7573
G'day,

Following the advice of PositionIsEvery thing.net
<http://www.positionise verything.net/articles/hollyhack.html> I inserted a
{ position: relative; } in both the enclosing TABLE and .histogram styles.
This fixed the problem.

Regards,
Chris.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2011
by: Bob Bedford | last post by:
I've a site where companies add their article. I'de like to provide a "lasts articles" table. By this, I'll show last articles inserted. But I won't always the same articles at any refresh. Question 1: how to get a "random" selection from the database, giving more priority to the last inserted (the ones with higher articleID) Question 2: I'd like to provide one article by client. I won't show 3 articles from the same client only because...
0
2087
by: CJ | last post by:
Hi We have Session Data lost randomly and Session State expired early. Our Intranet Application uses Window Server 2003 and .Net Framework 1.1. We set Session Time out to 60 minutes. but user Session Data lost randomly and Session State sometime expired early. I pretty run out the solution to fix this problem. Althoug we use Web Farm but we have Sticky IP to let user request go to the same server all the time. We turn off the Web...
5
5276
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the sessionstate inproc mode and users are randomly losing their session. I do not believe it is happening across all users at one time. It seems to happen to different users at different times, but I am only going off heresay. The aspnet worker...
3
1496
by: brian | last post by:
Hello, Can someone tell me how I can randomly assign a file to a variable from a directory. Example: Dim File as string I need to search through 'C:/Comics/' and have the program randomly pick a file from that path and assign it
5
5800
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control that I can drop into the beginning of any page and it will generate HTML to display my logo, a link, and (optionally) a quote of the day, all of which will be horizontally centered at the top of the page by my default stylesheet. For the main page,...
4
1376
by: dennis.mcknight | last post by:
new to php -- please help. it seems like php is treating any '>' character as the end of my code segment, even when it's embedded in a string, as shown <? $s="THIS IS MY TEST STRING"; ?> please advise -- it seems like something stupid. i'm running with PHP
2
2495
by: TPK | last post by:
I have an HTML document with Javascript where I have a portion of the page contents, a series of questions, being pulled from a XML file. When the page dynamically builds all the questions and selection choices are listed top down in the order they appear in the XML file. Here is an example of the XML formatting: <question type="single_answer">The text of a question. <answer correct="no">A. Answer One <user_feedback>Incorrect...
9
1705
by: Alan Isaac | last post by:
I need access to 2*n random choices for two types subject to a constraint that in the end I have drawn n of each. I first tried:: def random_types(n,typelist=): types = typelist*n random.shuffle(types) for next_type in types: yield next_type
9
3174
by: Generic Usenet Account | last post by:
I had a need to randomly select an element from an STL collection. It does not appear that this functionality is provided out-of-the-box with STL. Here is my crude implementation. I am using advance and distance in my approach. Is distance guaranteed to return an integral value? If not, can anyone suggest improvements: --Song ///// Header File //////
2
2229
by: tamaker | last post by:
Is this do-able with ASP / VBscript? -- I have a database with user records (name, photo, etc. etc.) I want to use asp to generate (on the homepage) a series of 4 randomly selected 'user records' from the database -- say just the headshot photo or name from the database. In addition to the recordset being randomly generated (i.e. our of about 50 records, only records 4, 18, 23 and 26 are displayed) I need
0
8878
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7389
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6200
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5671
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.