Opened 13 years ago
Closed 7 years ago
#9627 closed defect (fixed)
PATCH: fixed menu item height
Reported by: | falkb | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | MenusPlugin |
Severity: | trivial | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
I saw the mainnav menu item height was not correct with my Trac 0.12.2, and I don't have custom styles installed. It's displayed in FF and IE like this:
This patch fixes that:
-
menusplugin/0.11/tracmenus/htdocs/css/tracmenus.css
53 53 54 54 /*** TRAC STYLE CSS ***/ 55 55 #mainnav { 56 height: 1 6px;56 height: 14px; 57 57 padding-top: 0; 58 58 } 59 59 .sf-menu {
Attachments (2)
Change History (14)
Changed 13 years ago by
Attachment: | badHeight.jpg added |
---|
comment:1 follow-up: 2 Changed 13 years ago by
comment:2 follow-up: 3 Changed 13 years ago by
comment:3 Changed 13 years ago by
Replying to anonymous:
How is a 3/4 pixel possible?
I'm not sure, but if I zoom in many times on the page, then I reach a text size in which I can see the mainnav height change as the height is changed by a fraction of a pixel. I assume the mainnav height is just scaled by the zoom factor, so the fractional value has an effect at a high zoom factor.
Maybe that doesn't matter at all, but my point was, using a fixed pixel value for mainnav height might not be the right solution here. I can't say, I know very very little about CSS and these page layout issues.
comment:4 Changed 13 years ago by
For a while I played around with px, em, percent and that padding-top setting in different zoom levels of FF. I cannot find the one and only size. Sometimes it was too big, sometimes to small.
After all my impression is it all depends on the font of the menu item and its certain size in each zoom level plus a fixed scaled offset. The font height depends on the font which may be different on other styles or OS.
Best would be to take over the size of overlayed menu items, though I don't know how to do so.
comment:5 Changed 13 years ago by
Owner: | changed from Catalin BALAN to Ryan J Ollos |
---|---|
Status: | new → assigned |
Yeah, I see what you mean. Your patch seems like a step in the right direction. Maybe we can get it into the repository after I finish dealing with #7399.
comment:6 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Changed 13 years ago by
Attachment: | IE9-Win7x64.png added |
---|
comment:7 Changed 13 years ago by
comment:8 Changed 13 years ago by
Since we're talking about the height of the bar behind the menu, could a simple artifice help?: Instead of setting a fixed height, insert one single letter that should be overlayed by the foreground menu in all cases. That letter (using the same font like the menu item words) would fit the height as well, automatically.
comment:9 Changed 13 years ago by
I have no idea if that will work, but it sounds like a clever way to fix this if you can make it work. Maybe you could even just set the color of the letter to be the same as the background so that it is effectively invisible, regardless of a menu overlay.
comment:10 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
although I haven't got a clue when looking at this superfish stuff... hope dies at last
comment:11 Changed 8 years ago by
Owner: | Ryan J Ollos deleted |
---|---|
Status: | reopened → new |
comment:12 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Height adjusted for Trac 1.2 in r16733.
I did some testing with Trac 0.11 and the value 14.75px gives the best results on Ubuntu 10.04 with FF 3.6.24. I doubt that will be true across all browser and OS combinations. Is there a better way to go about this than explicitly setting a value for
height
in the CSS?