|
| |
| bassrocks | Asp.Net User |
| Top-level menu height | 11/27/2007 10:01:12 PM |
0/0 | |
|
I'm trying to create a horizontal menu, that has an tab image behind each leaf in the top level. The image is 96x70 px, and the width is working out fine, but height is driving me nuts. Here are relevant portions of my CSSMenu.css:
.CssAdapterMenu ul.AspNet-Menu /* Tier 1 */ { width: 100%; display: block; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; /* width: 70px; */ }
.CssAdapterMenu ul.AspNet-Menu ul /* Tier 2 */ { width: 6em; top: 100%; left: 0; } .CssAdapterMenu ul.AspNet-Menu ul ul /* Tier 3+ */ { top: -0.5em; left: 6em; }
.CssAdapterMenu ul.AspNet-Menu li /* Tier 1 */ { width: 96px; height: 70px; line-height: 14px; color: White; letter-spacing: 0.1em; background: url(../images/tab0.jpg) no-repeat center 50%; text-align: center; top: 1px; padding-top: 20px; }
.CssAdapterMenu ul.AspNet-Menu ul li /* tier 2+ */ { width: 14em; background: #c939d4 none; color:White; font-family:Arial; font-size:12px; text-align: left; padding-left: 8px; padding-top: 4px; line-height: 12px; letter-spacing: normal; }
.CssAdapterMenu li /* all list items */ { color:White; font-family:Arial; font-size:12px; }
With this, the background image ends just below the menu text. I can't mess with line-height in ul.AspNet-Menu li, because these tabs can have more than one line of text (otherwise, setting line-height to 70px would nearly fix it). One odd thing, is that if I uncomment /* width: 70px; */ in ul.AspNet-Menu, the image is cut just below the first text baseline (no matter what the height is).
Nothing I've tried has helped. Not even banging my head repeatedly against the keyboard. I've searched the forum (and other resources) for the answer to this, but I haven't been able to find it. If you have an answer, or can point me to one, I'd be a very happy camper.
Thank you very much!
- Andy |
| surfer5 | Asp.Net User |
| Re: Top-level menu height | 11/28/2007 9:52:57 PM |
0/0 | |
|
What browser are you testing in? I copied the code directly into a new project on top of the CSS code that comes with the adapters and it worked (basically). the background image i created to use as placeholders displayed fully (all 70 pixels of height) and the new menu showed up in Tier 2 as I would have expected. So it seemed to work for me.
You may have a problem in another line of code that you didn't display. Or it could be a browser compatability issue. Can you put up the entire CSS code that you are using? And also let me know what browser you are using (I'm using IE7 and it seemed to work for me).
Thanks.
-Jacob
|
| bpw | Asp.Net User |
| Re: Top-level menu height | 11/28/2007 10:49:26 PM |
0/0 | |
|
I struggled with height in IE6 (fine in Firefox). The lists are displayed ?block?, so you?d expect them to accept a height, but I couldn?t get it to work. I now use a fixed line-height (doesn?t have to be any larger than necessary) combined with top and bottom padding.
If anyone knows a better way?
Paul Weston |
| bassrocks | Asp.Net User |
| Re: Top-level menu height | 11/29/2007 2:58:02 AM |
0/0 | |
|
Here's the full CSSMenu.css. I should have posted it the first time, but there's a lot of ugly in here, because I've been focusing on getting the height issue worked out. I've been testing on IE7, for the most part, but also checking with Firefox 2.0.0.9 (separate issue, it looks totally different in Firefox, with the menus stacked vertically.)
Thanks for your time, Andy
.CssAdapterMenu ul.AspNet-Menu /* Tier 1 */ {
width: 100%;display: block;
font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 11px;
font-weight: bold;/* width: 70px; */
}
.CssAdapterMenu ul.AspNet-Menu ul /* Tier 2 */
{ width: 6em;
top: 100%;left: 0;
}
.CssAdapterMenu ul.AspNet-Menu ul ul /* Tier 3+ */
{ top: -0.5em; left: 6em;
}
.CssAdapterMenu ul.AspNet-Menu li /* Tier 1 */
{ width: 96px;
height: 70px;line-height: 14px;
color: White;letter-spacing: 0.1em;
background: url(../images/tab0.jpg) no-repeat center 50%;text-align: center;
top: 1px;padding-top: 20px;
}
.CssAdapterMenu ul.AspNet-Menu ul li /* tier 2+ */
{ width: 14em;
background: #c939d4 none;color:White;
font-family:Arial;font-size:12px;
text-align: left;padding-left: 8px;
padding-top: 4px;line-height: 12px; letter-spacing: normal;
}
.CssAdapterMenu li /* all list items */
{ color:White;
font-family:Arial;font-size:12px;
}
.CssAdapterMenu li:hover, /* list items being hovered over */ .CssAdapterMenu li.AspNet-Menu-Hover
{ color:Yellow; background: url(../images/tab1.jpg) no-repeat center 50%;
}
.CssAdapterMenu a, /* all anchors and spans (nodes with no link) */ .CssAdapterMenu span
{ color: White;
display: block;height:70px;
}
.CssAdapterMenu li.AspNet-Menu-Leaf a, li.AspNet-Menu-WithChildren a, /* leaves */ .CssAdapterMenu li.AspNet-Menu-Leaf span
{ color: White;
display: block;height:70px;
}
.CssAdapterMenu li:hover a, /* hovered text */ .CssAdapterMenu li:hover span, .CssAdapterMenu li.AspNet-Menu-Hover a, .CssAdapterMenu li.AspNet-Menu-Hover span, .CssAdapterMenu li:hover li:hover a, .CssAdapterMenu li:hover li:hover span, .CssAdapterMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover a, .CssAdapterMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover span, .CssAdapterMenu li:hover li:hover li:hover a, .CssAdapterMenu li:hover li:hover li:hover span, .CssAdapterMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover a, .CssAdapterMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover span
{ color: Yellow;
}
.CssAdapterMenu li:hover li a, /* the tier above this one is hovered */ .CssAdapterMenu li:hover li span, .CssAdapterMenu li.AspNet-Menu-Hover li a, .CssAdapterMenu li.AspNet-Menu-Hover li span, .CssAdapterMenu li:hover li:hover li a, .CssAdapterMenu li:hover li:hover li span, .CssAdapterMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li a, .CssAdapterMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li span
{ color: White;
}
.CssAdapterMenu .AspNet-Menu-Selected /* this tier is selected */
{ border: solid 1px #00ff00 !important;
}
.CssAdapterMenu .AspNet-Menu-ChildSelected /* a tier below this one is selected */
{ border: solid 1px #ff0000 !important;
}
.CssAdapterMenu .AspNet-Menu-ParentSelected /* a tier above this one is selected */
{ border: solid 1px #0000ff !important;
} |
| bassrocks | Asp.Net User |
| Re: Top-level menu height | 12/3/2007 10:33:44 PM |
0/0 | |
|
I was just experimenting with this further and, out of frustration, I set the height of ul.AspNet-menu to 7000px. And it worked! Actually, it the images were a little too tall with that, but after trying some random, large round numbers, I found that 4000px is perfect.
Question: What kind of sense does that make? I don't get it. Does anyone have a guess?
Thanks, Andy |
| camera | Asp.Net User |
| Re: Top-level menu height | 12/11/2007 2:34:23 PM |
0/0 | |
|
I might be able to help explain if you could post the rendered control's xhtml.
Vine Type: Content Management with Standards in Mind. http://vinetype.com |
|
| |
Free Download:
Books: Professional IPhone and IPod Touch Programming: Building Applications for Mobile Safari Authors: Richard Wagner, Pages: 284, Published: 2008 JavaScript: The Definitive Guide Authors: David Flanagan, Pages: 916, Published: 2002 TCL/TK in a Nutshell: A Desktop Quick Reference Authors: Paul Raines, Jeff Tranter, Pages: 440, Published: 1999 VBA Developer's Handbook Authors: Ken Getz, Mike Gilbert, Pages: 1104, Published: 2001 CSS, DHTML, & Ajax: Visual QuickStart Guide Authors: Jason Cranford Teague, Pages: 562, Published: 2007 Programming Python: Object-Oriented Scripting Authors: Mark Lutz, Pages: 1255, Published: 2001 Perl in a Nutshell: A Desktop Quick Reference Authors: Nathan Patwardhan, Ellen Siever, Stephen Spainhour, Pages: 737, Published: 2002 Web:Top-level menu height - ASP.NET Forums Top-level menu height. Last post 12-11-2007 9:34 AM by camera. 5 replies. Sort Posts:. Oldest to newest, Newest to oldest ... DHTML Lab: Hierarchical Menus Ver. 2 (Cross-Browser/Frames ... The second argument is the top-level menu count, topCount. ... By given time, we mean reading the height properties after a time interval. ... Dynamic Drive CSS Library- SuckerTree Horizontal Menu Sep 14, 2006 ... /*Sub level menu list items (undo style from Top level List Items)*/ ... first level submenus to be height of main menu item ultags[t]. ... Projectseven.com - Tutorials: Root Menu Images for Pop Menu Magic By setting the height of the link tag to 36px, and its width to 121px, ... Now locate the other three top-level menu items and assign them IDs b2, b3, ... The Tkinter Toplevel Widget (height/Height); highlightbackground= The color to use for the highlight region when ... On Unix and Windows, the menu is placed at the top of the toplevel ... Tk Built-In Commands - toplevel manual page On Microsoft Windows and all UNIX platforms, the menu will appear across the toplevel window as part of the window dressing maintained by the window manager ... Apycom DHTML Menu var iconHeight = 16;, item icon height. var iconTopWidth = 24;, icon width of top-level menu items. var iconTopHeight = 24;, icon height of top-level menu ... BUG: Adding Menu Shifts Controls and Reduces SDI Form Height In the General Options dialog box, select the Top-Level Form check box, ... The menu height is a configurable component of the Windows operating system. ... Can't get the offcolor with a top level anchor menu Can't get the offcolor with a top level anchor menu ..... ... win32 programmer ui Change menu height The submenu sizes are OK, but the top level menu height is stayed at the same height as GetSystemMetrics(SM_CYMENU) returns. THX again. ... Videos: HOW TO MAKE WALKING MOAI --A hypothesis about transportation method on Easter island--
Legend said Moai walked by itself.
But how did Moai walk?
I show you my proposal.
I... iTouchDS review this is my review of the iTouchDS
thank you dealwoot for contributing this flashcart for me
------------------------------
list of features written ... Revelation 2:1-7 Ephesus - The Busy Church How does busyness hurt our ability to witness for Jesus? How does ministry sometimes change our focus from loving the Messiah? Learn how to avoid the... Mac OS Automator: Doing things over and over is over. Google TechTalks
June 27, 2006
Sal Soghoian
ABSTRACT
Mac OS X "Tiger" introduces Automator, a new application that automates anything on your compu... Long Beach City Council Meeting Long Beach City Council Meeting train to belgium www.verfoto.be
erst de industrialisatie
,Firstly industrialisation
,La Belgique
, Bélgica
, Belgium
,Dan de moderne kleine stad
,Then the modern s... |
|
Search This Site:
|
|