Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-11-2011, 04:51 AM
|
#1
|
Member
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178
Rep:
|
HTML5 "<details>" tag display:inline, display:hidden CSS ignored (Firefox, Seamonkey)
Hello. Can't find anything relevant on Google search, so decided to look in the "other best place"...LQ!
I'm testing HTML5 for the first time, using Firefox (beta) 4.0b8 and SeaMonkey (beta) 2.1b1, and its ignoring some CSS. Specifically, I have problems with the <details> tag. (It is nested in a paragraph...I am using it to provide an in-paragraph definition in hopes it can be toggled.)
Firefox only partly supports <details>. It's not supposed to show anything except the content of <summary>, unless you click on <summary>'s content. Instead, it puts a line break before the content of <details>, splitting the paragraph in two peices (which looks silly), without the "closed/open" functionality.
So I tried using "display:inline" in my CSS, but that gets ignored. Just for fun, I also tried "display:hidden" (also ignored) and "display:none" (obeyed).
SeaMonkey doesn't doesn't do anything special with the content of <display>...but it also ignores the same CSS as Firefox.
The only thing I can do to support semantic design is apply "font-style:italic" to all <details> elements.
Granted, you might ask, "why bother using <details> at all. then?" Well, I would like to have <details> for the browsers that support it, with the "font-style:italic" to degrade the page nicely for those that don't (such as for SeaMonkey).
Does anyone know why "display:inline" and "display:hidden" get ignored?
|
|
|
01-11-2011, 10:23 PM
|
#2
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
Hi -
From an interesting blog:
Mathias goes on to suggest an interesting workaround:
Quote:
CSS, JavaScript, and jQuery to the rescue
Luckily it’s pretty easy to make <details> work cross-browser using a combination of CSS, (plain) JavaScript, and jQuery.
|
Here's a really interesting depiction of HTML 5 support, by browser:
http://html5readiness.com/
This link is a little less cool ... but a lot more understandable :
http://caniuse.com/
|
|
|
All times are GMT -5. The time now is 10:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|