473,765 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weird dynamic table rendering in Opera

Ok, I'm building a JS-based limitless-sublevel dynamic menu and am
making it cross browser as well - 3 packs of aspirin so far and
counting ;)

I'm having a weird rendering problem using Opera 7.51, even though it
displays fine in Mozilla 1.6, Firefox 0.9, Netscape 7.1 and Internet
Explorer 6.0

Hope someone can help!

In the HTML page ...

<table id="table_subme nu1" border="0" cellspacing="0" cellpadding="0"
style="Border: 1px solid #7E92A6; Position: absolute; Left: 0px; Top:
0px; Display: none;">
<tr>
<td>FLIBBLE</td>
</tr>
</table>

In the JS include ...

function showSubMenu( oMenu )
{
// Hide all menus below this one
var iMenuLevel = getMenuLevel( oMenu.id );
hideAllMenusBel owLevel( iMenuLevel );

// Break out if no sub-menu available
if ( !hasSubMenu(oMe nu.id) )
return false;

// Set up variables
var aThisMenuItems = getSubMenuItems ( oMenu.id );
var iThisLeft = bNetscapeBased ? getLeft( oMenu ) +
iNetscapeXOffse t : getLeft( oMenu );
var iThisTop = bNetscapeBased ? getTop( oMenu ) +
iNetscapeYOffse t : getTop( oMenu );
var iThisHeight = oMenu.offsetHei ght;
var iThisWidth = oMenu.offsetWid th;
var oSubMenuTable = eval( 'oTableSubmenu' + iMenuLevel );
var oSubMenuTbody = oSubMenuTable.g etElementsByTag Name( 'TBODY'
)[0];

// Clear the table
while ( oSubMenuTbody.h asChildNodes() )
oSubMenuTbody.r emoveChild( oSubMenuTbody.c hildNodes[0] );

// Build the table
for ( var iRow = 0; iRow < aThisMenuItems. length; iRow++ )
{
// Make the objects
var oNewTR = document.create Element( 'TR' );
var oNewTD = document.create Element( 'TD' );
var oNewDIV = document.create Element( 'DIV' );
var oNewTEXT = document.create TextNode( aSubMenuItems[
aThisMenuItems[iRow] ][0] );

// Add attributes/events to the objects
oNewTD.style.pa dding = '0px'; // Needed for
Opera browsers
oNewDIV.classNa me = 'menuitem';
if ( iRow > 0 )
oNewDIV.style.b orderTop = '1px solid #7E92A6';

// Add objects to the table
oNewDIV.appendC hild( oNewTEXT );
oNewTD.appendCh ild( oNewDIV );
oNewTR.appendCh ild( oNewTD );
oSubMenuTbody.a ppendChild( oNewTR );
}

// Show the table
with ( oTableSubmenu1. style )
{
display = 'block';

if ( iMenuLevel == 1 )
{
top = ( iThisTop + iThisHeight ) + 'px';
left = iThisLeft + 'px';
}
else
{
top = iThisTop + 'px';
left = ( iThisLeft + iThisWidth ) + 'px';
}
}
}

Ok, now THIS is the display in all the other browsers ...

http://freespace.virgin.net/martin.doyle1/rest.jpg

.... and THIS is how it displays in Opera

http://freespace.virgin.net/martin.doyle1/opera.jpg

It seems to be as if Opera is adding cellspacing to the table (if you
set the background color of the table it shows through, but not of the
cells) but I've explicitly turned it off and checked for it, and it's
not that. I also tried setting margin and padding of the tbody to
zero, but again no joy.

A sample site can be viewed at http://www.martindoyle.com/operasample
- while my PC is up and until this is solved anyway - so you can see
it in action.

Help desperately welcomed with open arms!!!
Jul 20 '05 #1
2 2584
us********@mart indoyle.com (Martin Doyle) wrote:
Ok, I'm building a JS-based limitless-sublevel dynamic menu and am
making it cross browser as well
No such thing since js is optional on the client side.
function showSubMenu( oMenu )
JS questions belong in a js group.
A sample site can be viewed at http://www.martindoyle.com/operasample
Congrats, you've managed to make it impossible for me to navigate your
site, SEs likewise.
Help desperately welcomed with open arms!!!


Stop doing silly things like using js for essential stuff like
navigation, use it for optional fluff only.

--
Spartanicus
Jul 20 '05 #2
Spartanicus <me@privacy.net > wrote in message news:<rm******* *************** **********@news .spartanicus.ut vinternet.ie>.. .
us********@mart indoyle.com (Martin Doyle) wrote:
Ok, I'm building a JS-based limitless-sublevel dynamic menu and am
making it cross browser as well


No such thing since js is optional on the client side.


Cross-browser means for it to work the same in the different flavours
of browser. It does not mean it will work identically in every browser
regardless of the settings specified by that particular user.
function showSubMenu( oMenu )


JS questions belong in a js group.


And questions about the layout of objects in different browsers belong
in the CSS group.
A sample site can be viewed at http://www.martindoyle.com/operasample


Congrats, you've managed to make it impossible for me to navigate your
site, SEs likewise.


Good, quite frankly.
Help desperately welcomed with open arms!!!


Stop doing silly things like using js for essential stuff like
navigation, use it for optional fluff only.


Your entire post is a perfect example of the kind of unhelpful,
arrogant and frankly impolite behaviour afflicting so many public
newsgroups. Thankfully I have had much more helpful posts in other
forums so I now have the solution, but your utterly pointless reply
has served no purpose other than to show your lack of both patience
and manners, not to mention wasting your obviously valuable time.
Jul 20 '05 #3

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

Similar topics

7
1862
by: lawrence | last post by:
This page renders slowly on both IE and Netscape - everything downloads before anything appears on screen. It is the behavior you'd expect if the whole thing was wrapped in a table, yet there is no table. What other sorts of problems normally cause this?
39
5684
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
10
26875
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
4
5509
by: David Ross | last post by:
In my <http://www.rossde.com/inflation.html>, I have a small table in the middle of the page. This page is composed without a DOCTYPE statement at the beginning. The table borders appear to my browser (Mozilla) as raised with a slight shadow to the right and below. The borders are specified with the "border" attribute in the <table> tag: <table border cellpadding=2 width="100%"> and not via a style sheet. If I add a DOCTYPE...
2
2248
by: yawnmoth | last post by:
I'm having some problems with css rendering differently on different browsers, on this page: http://www.frostjedi.com/terra/scripts/graemlin.php on both Opera and Firefox, I get spaces between the word "Suggestion", and the actual suggestions, themselves. On Firefox, I get an additional space after the copyright line.
20
3053
by: Tyler Carver | last post by:
I would like to do something that seems so basic with two div's but I don't think it can be done. Tables can do it in a snap. I was convinced that css was the way to go for layout but without being able to do even the easiest things, I don't see how. Here is the table way to do the layout (I want this to work in compliance mode in all modern browsers.): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"...
28
3433
by: Lachlan Hunt | last post by:
Hi, I've been trying, but failing to work out what is causing Opera to render my drop down menu incorrectly on my site. http://www.lachy.id.au/ For some reason, there seems to be extra margin added below each list item, that gets bigger for each subsequent item. Can someone please take a look and see if they can find my problem? It works almost perfectly in Firefox so you can see how it should look. It degrades
3
3040
by: David Whitney | last post by:
All: I have a control that renders a table. As the table is rendered, each row in the table is constructed by creating a run-time (dynamic) object that is derived from an HtmlTableRow. The row has three HtmlTableCell objects, and each cell contains a single control added to the HtmlTableCell's Controls collection. The basic table renders correctly, but the controls within the HtmlTableCell objects do not; the cells are just empty. (Just...
4
10394
by: Gabriel | last post by:
Which is the mistake? I need one column with different size. Thanks a lot. table { border: outset 2pt; border-collapse: separate; border-spacing: 4pt; background:black;
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10156
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
9951
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
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
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
7375
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
6649
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
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
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

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.