473,654 Members | 3,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

tab-like ul on multiple lines

Hi

This is not a "CSS I want you to do for me since my boss needs it
yesterday"... I am wondering about a few things, and I am still working
on this, but wanted to share it with you at this stage. Maybe you have
some input, which I would appreciate.

I made a tab-like display of a <ul>. It's easier shown than explained,
so here is the link: http://lingo.uib.no:9002/MOO_info/main.html

The part in question is the "div.menutablis t" (at the bottom of the CSS
section). I want to discuss the list layout only.

All in all, I think it works fine. But if there are too many tabs, or
the horizontal space is too small, they get broken over more than one
line. Try yourself by adjusting window width to display three and two
links in a row. I think it's kind of cool that the links now are
displayed almost 3d-ish.

Still there is something missing. I added

... a {margin-bottom: 2px solid #EDBD79;}

but it had a bad effect on the "floating" links, and even worse for the
ones on the ul container bottom line; they got these small lighter
angles in the lower left corner (of course). I added

... ul.menu {background-color: #F6DEBC;}

to gather the link some more, in an attempt to make them appear in some
kind of "field", but that didn't work.

That, and then that the display (when broken over lines) is misguiding:
The first list element would appear in the back row, which gives the
impression that is is not amoungst the first ones the user should read.
The order of links has, of course, a meaning.

I hardly want to reverse the order of links - that would make the first
element appear on the right. And since I don't know how many links per
row the user actually views, I cannot take the row with the chosen link
and display it first and move the others back. The links are server
generated; when the page is requested, I can sort the links
alphabetically, chronolocically , and interchange them like I please.

Theoretically, I could force the chosen link to be amoungst the three
latest links, thus ensuring it "always" would stay in the bottom line.
But that would mean changing the order of links (and/or: rows) whenever
the user clicks on one - generally not a good thing, I think. And I have
no control over the user's viewport, so I don't even know if he will
always have at least three links in one row.

This is a "pattern" what will serve a range of pages. The number of
links could be from 3 to maybe 16, and the length could vary a lot (up
to a few words). I really want to make that work neatly for all pages,
so I'm working on a solution that works for rather long lists as well.

How about a bottom line for each (virtual) row? A line that would appear
only when the list is broken over more than one line, and which would
stay behind the nearest/lowest links? Can't see the coding for that
right now. But maybe someone has done that already, or something similar?

Needless to say, I don't want graphics, and I want to do that as
low-level-CSS as possible, since I am afraid I can't trust the users to
have latest CSS level.

Thanks for listening, and maybe input.

- Daniel
Jul 21 '05 #1
6 7794
Daniel Jung wrote:
Hi

This is not a "CSS I want you to do for me since my boss needs it
yesterday"... I am wondering about a few things, and I am still working
on this, but wanted to share it with you at this stage. Maybe you have
some input, which I would appreciate.

I made a tab-like display of a <ul>. It's easier shown than explained,
so here is the link: http://lingo.uib.no:9002/MOO_info/main.html

Your URL is broken:

An internal server error was encountered. If this problem persists please
notify a MOO administrator.

Failed request was: GET /MOO_info/main.html HTTP/1.0
Details:
Traceback 3116:
$MOO_info:main_ html, line 52 (Type mismatch)
.... called from $httpd:get, line 70

(End of traceback)
--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #2
Jim Moe wrote:
so here is the link: http://lingo.uib.no:9002/MOO_info/main.html

Your URL is broken:


Wooops - some changes I made and didn't check... Thanks for looking, and
thanks for reporting! Very sorry. I fixed that now. You may have a look
again.

- Daniel
Jul 21 '05 #3
Daniel Jung wrote:

All in all, I think it works fine. But if there are too many tabs, or
the horizontal space is too small, they get broken over more than one
line. Try yourself by adjusting window width to display three and two
links in a row. I think it's kind of cool that the links now are
displayed almost 3d-ish.

Change "ul.menu" to
ul.menu { margin: 0; padding: 0; white-space: nowrap; }
The nowrap applies since the <li>'s are display:inline.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #4
Jim Moe wrote:
Daniel Jung wrote:

All in all, I think it works fine. But if there are too many tabs, or
the horizontal space is too small, they get broken over more than one
line. Try yourself by adjusting window width to display three and two
links in a row. I think it's kind of cool that the links now are
displayed almost 3d-ish.

Change "ul.menu" to
ul.menu { margin: 0; padding: 0; white-space: nowrap; }
The nowrap applies since the <li>'s are display:inline.


Thanks for replying!

But I don't really see why I should do that (white-space: nowrap in ul).
That would mean forcing them on one row, and that would mean horizontal
scrolling when there are too many links or horizontal space is too
small. I DO want them to appear on the page, and I want to get them nice
when they DO wrap; hence the rest of my OP.

- Daniel
Jul 21 '05 #5
Daniel Jung wrote:
Hi

This is not a "CSS I want you to do for me since my boss needs it
yesterday"... I am wondering about a few things, and I am still working
on this, but wanted to share it with you at this stage. Maybe you have
some input, which I would appreciate.

I made a tab-like display of a <ul>. It's easier shown than explained,
so here is the link: http://lingo.uib.no:9002/MOO_info/main.html

The part in question is the "div.menutablis t" (at the bottom of the CSS
section). I want to discuss the list layout only.

All in all, I think it works fine. But if there are too many tabs, or
the horizontal space is too small, they get broken over more than one
line. Try yourself by adjusting window width to display three and two
links in a row. I think it's kind of cool that the links now are
displayed almost 3d-ish.


The 3d-ish effect seems to break down for extremely large or small text
- for very large there's no overlap, for very small the text starts to
be occluded. I suspect it's padding in ems & border in px. Perhaps a
little margin to get rid of the "3d-ish" effect would be the best solution.

Otherwise, as you say, fine.

Chris
Jul 21 '05 #6
Daniel Jung <ju**@uib.no> wrote:
That, and then that the display (when broken over lines) is misguiding:
The first list element would appear in the back row, which gives the
impression that is is not amoungst the first ones the user should read.


http://www.w3.org/TR/CSS21/visudet.h...ef-line-height

Btw, don't size fonts with the px unit, IE users will have difficulties
scaling them.

--
Spartanicus
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
27522
by: Paul Mendez | last post by:
I am creating a form with a tab control containing 10 tabs. and what I want to do is on only on of the tabs, I want a sub section of tabs. So what it ends up being is one main tab control with another tab control embedded into only one of the tab pages. The problem I am getting is when I insert the sub section tab control into one of the tabs from the main tab control, the sub section tab control appears in every tab in the main tab...
1
2036
by: Marcus | last post by:
Anyone know why when I set my tabs index in my tab control (I have 3 tabs on the control) the numbering gets messed up when I save the form changes? I thought each tab on the control had an independent tab index, I guess not. Marcus ******
9
7966
by: Bob Cummings | last post by:
Greetings I have googled this to no avail, maybe someone here can help. I have a user control that has several radio buttons and text boxes. I place 5 of these user controls on a windows form. I have set the tab order on the user control and then I set the tab order on the windows form. For some reason I only tab from user control to user control. Is there any way to tab all the way through my user control before proceeding to the...
2
2395
by: Johann Blake | last post by:
The following is a bug I have discovered using tab pages and threads and I am looking for a workaround. Create a new Windows Forms application and add a tab control with two tab pages. Add a label to each tab page. On the first tab page add a button. When the button is pressed the code behind the button creates a thread and starts that thread. The only thing that the thread is to do is to switch from the first tab page to the 2nd tab...
11
3219
by: Dave | last post by:
Access 2003 I have a main form with two tab forms, one showing Client, and the other Spouse info, each with Address tabs. When I click on the Client address tab, I would like to have the Spouses address tab show as well. Although the above is the primary issue to resolve, it would also be handy to go a step further...each Address tab has a sub-form with two tabs; Civic Address, and Mailing Address. Being able to click on the Clients...
6
1999
by: DrifterKona | last post by:
I have a form with 4 pages. I'm not sure of the correct name, but I will refer to the tabs at the top of the form that list the names of the four pages as the "page tabs". When the form opens, the body of the form automatically scrolls down to the first tab stop on the form. This causes the body of the form to scroll down so far that the page tabs are no longer viewable. That is undesirable for two reasons. First, if a user wants to...
3
2012
ADezii
by: ADezii | last post by:
One frequently asked question at TheScripts is how to set focus/make active a specific Tab on a Tab Control other than clicking on it. Before I provide the answer, I feel as though a little summary information would be most helpful. __1. An individual Tab on a Tab Control is actually a Page Object. For this discussion, we will use the terms Tab/Page interchangeably, however. __2. Each Page Object is a member of the Pages Collection which...
4
44073
ADezii
by: ADezii | last post by:
One frequently asked question at TheScripts is how to set focus/make active a specific Tab on a Tab Control other than clicking on it. Before I provide the answer, I feel as though a little summary information would be most helpful. __1. An individual Tab on a Tab Control is actually a Page Object. For this discussion, we will use the terms Tab/Page interchangeably, however. __2. Each Page Object is a member of the Pages Collection which...
7
2196
daJunkCollector
by: daJunkCollector | last post by:
The following code creates some very nice tabs. However, the I click the tab it displays specified text below the button. I want the tab to execute a page change, so I can use the tabs for my page's primary navigation. Is there a simple change I can make so that click the tab causes the current URL to change? Thanks <script language="JavaScript">
1
5794
by: chaitanyadotcom | last post by:
As per my application i need to create tabs using iFrame dynamically. There are totally 4 buttons in my application where for each button i provide a link. Where in it will dynamically create a tab inside the iFrame. For example.. first button contains google.com second button contains yahoo.com 3rd button contains hotmail.com if i click on first button i.e google.com , tab is created and link to google.com is generated as a tab in...
0
8372
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8814
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7304
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.