473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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.menutablist" (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 7787
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.menutablist" (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
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...
1
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...
9
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....
2
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...
11
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...
6
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,...
3
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...
4
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...
7
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.