473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CSS style within table cell works after being hovered over

T
I am attempting to create a menu using <div> and <span> tags within a
table cell. When the page loads, some of the classes don't seem to be
applied. If I hover over the menu everything is fine from that point
on. If I remove the table everything renders correctly, and I have no
problems. Unfortunately, I need to nest this menu within a table. I
am currently having this problem in IE 6. Thanks in advance for the
help!

<html>
<style type="text/css">
.menu .aa { width: 5px; float: left; border-bottom: 1px solid
#000; background: #bcd; }
.menu .bb { float:left; padding:2px 0 2px 0; border-bottom:1px
solid #000; border-top:1px solid #000; background:#bcd;
text-align:center; }
.menu .sela { width:5px; float:left; background:#fff;
font-size:1em;}
.menu .selb {float:left; padding:2px 0 2px 0; border-top:1px solid
#000; background:#fff; color:#f00; font-size:1em;}
.menu .va {width:1px; float:left; border-top:5px solid #fff;
background:#000; overflow:hidden;}
.menu .vb {width:1px; float:left; height:1px; background:#ccc;
border-top:2px solid #fff; border-bottom:2px solid #000;
overflow:hidden;}
.menu .vc {width:1px; float:left; height:1px; background:#ccc;
border-top:1px solid #fff; border-bottom:1px solid #000;
overflow:hidden;}
.menu .vd {width:2px; float:left; height:1px; background:#000;
border-top:1px solid #ccc; overflow:hidden;}
.menu a, .menu a:visited {color:#444; text-decoration:none;
font-size:1em; cursor:pointer; cursor:hand; background:#c88;}
.menu a:hover {color:#c00; background:#def;}
.menu a:hover .aa, .menu a:hover .bb {background:#def;}
.pad {float:left; color:#fff;}
.padtop {float:left; display:block; padding:0 5px;}
* html .menu .vb {height:5px; he/ight:1px;}
* html .menu .vc {height:3px; he/ight:1px;}
* html .menu .vd {height:2px; he/ight:1px;}
</style>
<body>
<table>
<tr>
<td>
<div class="menu">
<span class="sela">
<span class="va"></span>
<span class="vb"></span>
<span class="vc"></span>
<span class="vd"></span>
</span>
<span class="selb">By Visit</span>
<span class="sela">
<span class="vd"></span>
<span class="vc"></span>
<span class="vb"></span>
<span class="va"></span>
</span>
<a href="#">
<span class="aa">
<span class="va"></span>
<span class="vb"></span>
<span class="vc"></span>
<span class="vd"></span>
</span>
<span class="bb">Overview</span>
<span class="aa">
<span class="vd"></span>
<span class="vc"></span>
<span class="vb"></span>
<span class="va"></span>
</span>
</a>
<a href="#">
<span class="aa">
<span class="va"></span>
<span class="vb"></span>
<span class="vc"></span>
<span class="vd"></span>
</span>
<span class="bb">By ID</span>
<span class="aa">
<span class="vd"></span>
<span class="vc"></span>
<span class="vb"></span>
<span class="va"></span>
</span>
</a>
</div>
</td>
</tr>
</body>
</html>
Jul 20 '05 #1
3 5261
T wrote:
I am attempting to create a menu using <div> and <span> tags within
a table cell. When the page loads, some of the classes don't seem
to be applied.
url? (The code you pasted in just doesn't cut it; we need a live example.)
If I remove the table everything renders correctly, and I have no
problems.
It seems the solution is rather obvious then, no?
Unfortunately, I need to nest this menu within a table.


Why is that?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2
T
Brian <us*****@julietremblay.com.invalid> wrote in message news:<10*************@corp.supernews.com>...
T wrote:
I am attempting to create a menu using <div> and <span> tags within
a table cell. When the page loads, some of the classes don't seem
to be applied.
url? (The code you pasted in just doesn't cut it; we need a live example.)


Here is the look I am trying to get:
http://66.188.102.22:75/menu/withouttable.htm

Here is a portion of the problem page:
http://66.188.102.22:75/menu/withtable.htm
If I remove the table everything renders correctly, and I have no
problems.


It seems the solution is rather obvious then, no?
Unfortunately, I need to nest this menu within a table.


Why is that?


I have a template which holds a logo within a table so I need to keep
the page layout uniform.

For some background:
At runtime I transform my xml doc using the xml component in .net.
When I run the transform outside of my application the apperance is
fine, it is only when it is within the table that I have problems.

Any light shed on this issue would be much appreciated.
Jul 20 '05 #3
T wrote:
Brian wrote...
T wrote:


Here is the look I am trying to get:
http://66.188.102.22:75/menu/withouttable.htm

Here is a portion of the problem page:
http://66.188.102.22:75/menu/withtable.htm


These look identical to me, except the font size in withouttable is
larger than in withtable. Firefox 0.8/Win XP. What problem are you
seeing? Which browser/os?
Unfortunately, I need to nest this menu within a table.


Why is that?


I have a template which holds a logo within a table so I need to
keep the page layout uniform.


That's a non-sequitur. There's not reason why you can't have a
site-wide look without tables-for-layout.
--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4

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

Similar topics

35
by: wired | last post by:
Hi, I've just taught myself C++, so I haven't learnt much about style or the like from any single source, and I'm quite styleless as a result. But at the same time, I really want nice code and I...
18
by: Randall Sell | last post by:
http://www.bytewise.com.au/test/iebug.html I can not see why this doesn't work under IE6. Perhaps someone can shed some light on this, and a possible hack to get it to work. My ultimate goal is...
72
by: Herbert | last post by:
I'm still relativey new to stylesheets, so I'm hoping that the way I'm going about things can be seriously improved upon, i.e . I just haven't undersood something obvious about the 'cascading'...
0
by: T | last post by:
I am attempting to create a menu using <div> and <span> tags within a table cell. When the page loads, some of the classes don't seem to be applied. If I hover over the menu everything is fine...
2
by: Sugapablo | last post by:
Can anyone help me out with some code to change three table cells (<td>) when one is hovered over? I have a calendar grid where each day is made up of three table cells and I want all three to...
1
by: Angel | last post by:
I have the following definition for a Table cell: <TD class="clsMenuItem" onmouseover="this.classname='clsMenuOver'" onmouseout="this.classname='clsMenuItem'">WHATEVER</TD> The class(Style)...
4
by: jarek | last post by:
Hi, this is my code: CSSStyleDeclaration.prototype.__defineSetter__('display', displaySetter); function displaySetter(value) { var parent = findParent(document, this); if (parent) {
1
by: atilghman | last post by:
I've run into a problem with style computation under Firefox (Gecko/20061010 Firefox 2.0) which I can't understand. Any help would be appreciated. My short test case (...
2
by: kigerm | last post by:
Hey guys, Here is my problem. I have a page consisting of a table with one row and 2 cells. Inside the first cell is a table that serves as a table of contents. That table has several rows with...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
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...
0
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,...

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.