473,686 Members | 2,955 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 2577
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
1856
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
5675
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
26871
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
5503
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
2241
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
3041
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
3417
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
3024
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
10391
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
8586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8942
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8776
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
8781
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
7610
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
6444
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
4313
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...
1
2957
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
3
1943
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.