LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Reply
 
Search this Thread
Old 01-11-2011, 04:51 AM   #1
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Rep: Reputation: 28
Unhappy 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?
 
Old 01-11-2011, 10:23 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

From an interesting blog:
Quote:
http://mathiasbynens.be/notes/html5-details-jquery

The HTML5 <details> element is currently not natively supported in any browser.
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/
 
  


Reply

Tags
details element tag, display:hidden, display:inline, html5, open


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". HELP! badgerbox76 Linux - Newbie 35 03-08-2007 02:27 AM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". badgerbox76 Linux - Games 13 01-11-2006 04:47 PM
Display "Details during Startup" RHEL4 backroger Linux - Enterprise 4 03-26-2005 01:31 PM


All times are GMT -5. The time now is 08:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration