This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 126675 - Horizontal tabs don't scale well
Summary: Horizontal tabs don't scale well
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Website (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: phoenix.ui CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 117710 150433 (view as bug list)
Depends on: 197520
Blocks:
  Show dependency tree
 
Reported: 2006-02-06 21:44 EST by Linda Watson CLA
Modified: 2007-07-26 15:16 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix cuts the background (8.37 KB, image/jpeg)
2006-05-24 15:15 EDT, Eclipse Webmaster CLA
no flags Details
To menus with second fix (7.21 KB, image/jpeg)
2006-05-30 09:22 EDT, Eclipse Webmaster CLA
no flags Details
Proposed fix (10.75 KB, patch)
2007-05-26 05:15 EDT, Stanimir Stamenkov CLA
no flags Details | Diff
Proposed fix (alternative) (2.24 KB, patch)
2007-05-26 08:36 EDT, Stanimir Stamenkov CLA
no flags Details | Diff
Proposed fix (complete) (13.00 KB, patch)
2007-05-27 06:44 EDT, Stanimir Stamenkov CLA
no flags Details | Diff
topnav_tabstart_first.gif (344 bytes, image/gif)
2007-05-27 06:46 EDT, Stanimir Stamenkov CLA
no flags Details
topnav_tabstart_selected_inline.gif (249 bytes, image/gif)
2007-05-27 06:47 EDT, Stanimir Stamenkov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Linda Watson CLA 2006-02-06 21:44:39 EST
I'm logging this bug on behalf of visual designer Jinsil Boo, who noticed that the  horizontal tabs - e.g. "Projects", "About Us" scale awkwardly when the browser window is sized to smaller widths. 

Compare for example how these 2 sites handle scaling tabs when browser window is sized to smaller widths:

1.Firefox tabs scale incrementally, truncating tab content for scenarios with multiple tabs
2.Amazon top level horizontal tabs remain in fixed location offscreen
Comment 1 Nick Papadopoulos CLA 2006-02-09 12:53:41 EST
Jinsil wanted me to take a look at this bug. Is it possible for me to have access to the server where the source files are stored?
Comment 2 Eclipse Webmaster CLA 2006-02-09 13:59:08 EST
Sure... The code is in anonymous CVS.

:pserver:anonymous@dev.eclipse.org:/cvsroot/technology

Look in org.eclipse.phoenix/eclipse.org-common

But you should be OK just by using your browser's View Source function. Our two CSS files are here:

http://www.eclipse.org/eclipse.org-common/themes/Phoenix/css/visual.css
http://www.eclipse.org/eclipse.org-common/themes/Phoenix/css/layout.css
Comment 3 Nick Papadopoulos CLA 2006-02-09 14:45:19 EST
To fix the Navigation from scaling down, you can add the following code to the #topnav ID selector in the visual.css document - width: 700px;
Comment 4 Eclipse Webmaster CLA 2006-05-24 15:15:10 EDT
Created attachment 42476 [details]
Proposed fix cuts the background

I applied the proposed fix.  However, it seems to cut the background (attached screenshot)

/* Top Navigation Rules */
#topnav {
	background-image: url(/eclipse.org-common/themes/Phoenix/images/topnav_tabbg.gif);
	background-repeat: repeat-x;
	color: #999;
	font-size: 0.9em;
	width: 700px;
}
Comment 5 Linda Watson CLA 2006-05-25 11:44:16 EDT
Re comment 4: 
Thanks ... Nick will look into this to see if he can find solution; aiming to get back to you in next week or so.
Comment 6 Nick Papadopoulos CLA 2006-05-29 19:18:58 EDT
Add this line of code to the #topnav ID selector:

WHITE-SPACE: nowrap;

also, change the width to %100

This will prevent the text from wrapping when the browser is scaled down as long as there are no <br> tags in the html.

I tested this out on my end and had success with it. Let me know how it goes for you.
Comment 7 Eclipse Webmaster CLA 2006-05-30 09:22:52 EDT
Created attachment 42946 [details]
To menus with second fix

Thanks, Nick, but I applied this to visual.css and fail to see any results:

#topnav {
	background-image: url(/eclipse.org-common/themes/Phoenix/images/topnav_tabbg.gif);
	background-repeat: repeat-x;
	color: #999;
	font-size: 0.9em;
	white-space: nowrap;
	width: 100%;
}

With the white-space and width, the top navigation menu tabs still wrap on a separate line when the browser window size is reduced.
Comment 8 Nick Papadopoulos CLA 2006-06-22 14:05:49 EDT
Could you show me the HTML code that goes along with the CSS?

I tested this out, with a mock-up I was working with and had no problems.

I'll send you another proposal soon as well. There may be more ways to get around this.
Comment 9 Eclipse Webmaster CLA 2006-08-04 14:32:46 EDT
(In reply to comment #8)
> Could you show me the HTML code that goes along with the CSS?

Whatever's on www.eclipse.org.  In CVS, it's at :pserver:anonymous@dev.eclipse.org/cvsroot/technology/org.eclipse.phoenix/eclipse.org-common

Comment 10 Eclipse Webmaster CLA 2006-10-06 10:17:22 EDT
*** Bug 117710 has been marked as a duplicate of this bug. ***
Comment 11 Eclipse Webmaster CLA 2006-10-06 10:23:02 EDT
*** Bug 150433 has been marked as a duplicate of this bug. ***
Comment 12 Stanimir Stamenkov CLA 2007-05-26 05:15:49 EDT
Created attachment 68852 [details]
Proposed fix
Comment 13 Stanimir Stamenkov CLA 2007-05-26 08:36:48 EDT
Created attachment 68855 [details]
Proposed fix (alternative)

There appears to be mixture of line endings in "layout.css" and it shows changed as whole in attachment 68852 [details] - if for some reason it doesn't apply cleanly try this one, instead.
Comment 14 Stanimir Stamenkov CLA 2007-05-27 06:44:04 EDT
Created attachment 68870 [details]
Proposed fix (complete)

I have no experience with PHP but modified the "menu.php" template on a best-guess basis to remove the extra LI elements generated just for styling the tabs.  The correct way to achieve the same is using CSS generated content (e.g. the ::before and ::after pseudo-elements) but since it is not well-implemented across browsers the acceptable workaround is to use generic meaning elements like DIV or SPAN but not specialized meaning elements like LI (they are supposed to have content).  In this case I went without any extra empty elements.

One would also need fixed versions of two of the images I'm about to attach next.
Comment 15 Stanimir Stamenkov CLA 2007-05-27 06:46:30 EDT
Created attachment 68871 [details]
topnav_tabstart_first.gif

/eclipse.org-common/themes/Phoenix/images/topnav_tabstart_first.gif
Comment 16 Stanimir Stamenkov CLA 2007-05-27 06:47:36 EDT
Created attachment 68872 [details]
topnav_tabstart_selected_inline.gif

/eclipse.org-common/themes/Phoenix/images/topnav_tabstart_selected_inline.gif
Comment 17 Denis Roy CLA 2007-05-28 09:06:28 EDT
Thanks for the patches.  I'm not sure if I applied them correctly, as things don't look right on http://phoenix.eclipse.org/downloads/

At any rate, I wouldn't invest too much time in fixing this, as we've begun working on bug 160442 - Improve the Phoenix skin.  The work we do there will likely fix the problem here, as the tabs will look like those on http://live.eclipse.org
Comment 18 Denis Roy CLA 2007-07-26 15:16:05 EDT
This has been fixed by bug 197520