473,385 Members | 1,521 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,385 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 5258
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.