473,474 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IE6 vs FF horizontal placement issue

3 New Member
OK, I have my dynamic script stripped down to show you my problem. I've tried fixing it anyway I can between IE6 and FF, so the CSS might be a bit bloated now with unnecessary elements.

The code is hosted on my lan but I put it out on:

http://www.welovetodd.com/test.html

It renders 'correctly' in FF with the text to the left, in a right justified div, and the green block should be in a left justfied div just the the right of it. If FF this works, in IE the div containing the green box is drawn just underneath the text. You'll see if you check it out in both browsers.

The CSS is at:

http://www.welovetodd.com/mainStyleSheet.css

Thanks for your help!

JT
May 31 '07 #1
4 1732
thejam
3 New Member
I figure I'll just post the code for ya.

test.html -
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5. <title></title>
  6. <link rel="stylesheet" type="text/css" href="mainStyleSheet.css">
  7. <meta http-equiv='Refresh' content='9999999'>
  8. </head>
  9. <body>
  10.  
  11. <div class="lineItem">
  12.     <div class="lineItemTitle">
  13.         <a href="groupView.php?gid=1">FANMedia</a>&nbsp;&nbsp;&nbsp;&nbsp;
  14.     </div>
  15.     <div class="lineItemMonitors">
  16.         <div id="monitor36" style="display: inline; width: 2px; position: relative;">
  17.           <span class="greenDot" onmouseover="return escape('monitor<br/>Last Ran at 2007-05-31 20:20:00.000')">&nbsp;</span>
  18.         </div>
  19.     </div>
  20. </div>
  21.  
  22. </body>
  23. </html>
mainStyleSheet.css -
Expand|Select|Wrap|Line Numbers
  1. body
  2. {
  3.  
  4.   font-family:Tahoma,Arial,Helvetica,sans-serif;
  5.   background-color:white;
  6.  
  7. }
  8.  
  9. div.lineItem
  10. {
  11.   cursor:default;
  12.   position:relative;
  13.   padding:5px;  
  14.   width:100%;
  15.   clear:both;
  16. }
  17.  
  18. div.lineItemTitle
  19. {
  20.   display:table-cell; 
  21.   display:inline-block;
  22.   position:relative;
  23.   width:165px;
  24.   text-align:right;
  25.   font-size:16px;
  26.   font-weight:bold;
  27.   clear:both;
  28. }
  29.  
  30. div.lineItemMonitors
  31. {
  32.   display:table-cell; 
  33.   display:inline-block;
  34.   position:relative;
  35.   font-size:11px;
  36.   clear:both;
  37. }
  38.  
  39. span.greenDot
  40. {
  41.   left:2px;
  42.   border:none;
  43.   background-color:green;
  44. }
  45.  
  46. span.redDot
  47. {
  48.   left:2px;
  49.   border:none;
  50.   background-color:red;
  51. }
  52.  
  53. td
  54. {
  55.   background-color: #F8F8FF;
  56.   border: none;
  57.   border-width: 1px;
  58.   border-color: black;
  59.   padding: 4px;
  60.   margin: 0px;
  61. }
  62.  
  63. td.monitor
  64. {
  65.   width: 22px;
  66.   text-align: center;
  67. }
  68.  
  69. td.status
  70. {
  71.   width: 100px;
  72. }
  73.  
  74. td.name
  75. {
  76.   width: 295px;
  77. }
  78.  
  79. td.refresh
  80. {
  81.   width: 75px;
  82. }
  83.  
  84. td.updated
  85. {
  86.   width: 200px;
  87. }
May 31 '07 #2
drhowarddrfine
7,435 Recognized Expert Expert
I'll be gone for a few hours but IE tends to add margins and padding where there is none. Check your widths. If it's, say 800px wide, and everything adds up to 800, then IE is probably throwing a few more px in for you.
May 31 '07 #3
thejam
3 New Member
I'll be gone for a few hours but IE tends to add margins and padding where there is none. Check your widths. If it's, say 800px wide, and everything adds up to 800, then IE is probably throwing a few more px in for you.
The container div (lineItem) is set to 100% width. The two divs contained within (lineItemTitle and lineItemMonitors) should be horizontal each other. One does have a width of 165px, but the other has no width specified. With the parent element set to 100% width, how would width affect it even in IE?

I thought that was it at first too...

Expand|Select|Wrap|Line Numbers
  1. div.lineItem
  2. {
  3.   cursor:default;
  4.   position:relative;
  5.   padding:5px; 
  6.   width:100%;
  7.   clear:both;
  8. }
  9.  
  10. div.lineItemTitle
  11. {
  12.   display:table-cell;
  13.   display:inline-block;
  14.   position:relative;
  15.   width:165px;
  16.   text-align:right;
  17.   font-size:16px;
  18.   font-weight:bold;
  19.   clear:both;
  20. }
  21.  
  22. div.lineItemMonitors
  23. {
  24.   display:table-cell;
  25.   display:inline-block;
  26.   position:relative;
  27.   font-size:11px;
  28.   clear:both;
  29. }
May 31 '07 #4
drhowarddrfine
7,435 Recognized Expert Expert
display:table-cell does not work in IE, only modern browsers like FF.
display:inline-block is also iffy in IE.

You are using 'clear:both' but that property is only related to floated elements which you aren't using.

With that in mind, I would re-think this. I'm wondering if you are trying to make this page layout act like a table.
May 31 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

23
by: Giancarlo Niccolai | last post by:
Hello all. I have peeked through the FAQ and all relevant links, and also through Stroustrup book, but I have not been able to find an answer, so I have to post here as a last resort. It...
20
by: Ioannis Vranos | last post by:
When we use the standard placement new operator provided in <new>, and not a definition of owr own, isn't a call to placement delete enough? Consider the code: #include <new>
2
by: Doug Carter | last post by:
I'm using a horizontal scroll bar control to represent teh default values of MIn 0 to Max 100. I assign the current value of the horizontal control to a label control.Text string but when the...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
15
by: mangesh | last post by:
This code is from c++ faq in section 11 : void someCode() { char memory; void* p = memory; Fred* f = new(p) Fred(); f->~Fred(); // Explicitly call the destructor for the placed object }
5
by: Lagarde Sébastien | last post by:
Hello, I write code to debug new call with following macro: #define new (MemoryManager::Get().setOwner (__FILE__, __LINE__, _FUNCTION-), FALSE) ? NULL : new The setOwner allow to save the...
15
by: LuB | last post by:
I am constantly creating and destroying a singular object used within a class I wrote. To save a bit of time, I am considering using 'placement new'. I guess we could also debate this decision -...
9
by: karthikbalaguru | last post by:
Hi, I find that articles stating that 'placement new' constructs an object on a pre-allocated buffer and so takes less time. Actually, we have to consider the allocation of the buffer and then...
6
by: sparc | last post by:
Hi Guys, I am encountering the following issue : void* pMemory = m_Allocator.allocate( uiSize * sizeof( T ) ); m_atData = new( pMemory ) T; Debug.vc8.scurc.exe!`eh vector constructor...
19
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.