Open GoogleCodeExporter opened 9 years ago
Do you need exacly display: table? Do you want to make horizontal menu?
Why not just:
nav a, nav a:visited {display: block; float: left; width: some; height: some;
margin: 0 0 3px 0;}?
or
nav a, nav a:visited {display: inline, margin: 0 0 3px 0;}
and
nav a:hover, nav a:active { background-color:#f38025; color:#fff; }
Otherwise you should use list to make menu <ul> and list items <li>;)
Original comment by resp...@gmail.com
on 22 Jun 2010 at 9:29
Do I need display:table? No, I can actually use a table even though I despise
them. In most instances I would use an unordered list to create my horizontal
menu.
To get the proper spacing from the li's so that they proportionally fill the
width of the ul you really have to tweak the padding based on the content.
Since I'm creating a university level template, it needs to accommodate the the
various number of list items and widths of the subsequent textual length of
their anchors that the different colleges/departments will be using.
So yeah, I need to use a table or simulate a table. And since the table options
for Display: are supported in CSS3 I'd like to use them.
Too bad IE is so annoying, but this script has helped so much already.
Original comment by sethhump...@gmail.com
on 23 Jun 2010 at 12:16
[deleted comment]
TBH, This is pretty difficult to implement (maybe impossible without altering
the DOM). Any solution would also be pretty slow. I'll add this as an
enhancement but with low priority.
Original comment by dean.edw...@gmail.com
on 30 Jun 2010 at 6:54
[deleted comment]
I've solved this using jQuery:
$(document).ready(function(){
if ($.browser.msie && $.browser.version == 7)
{
$(".tablecell").wrap("<td />");
$(".tablerow").wrap("<tr />");
$(".table").wrapInner("<table />");
}
});
the above script assumes you have divs using style such as:
<style>
.table { display: table; }
.tablerow { display: table-row; }
.tablecell { display: table-cell; }
</style>
Original comment by andymag...@gmail.com
on 10 Feb 2011 at 10:19
Original issue reported on code.google.com by
sethhump...@gmail.com
on 21 Jun 2010 at 10:30