CSS Tag to hide Form Buttons for print mode

Discussion about CSS related issues.

CSS Tag to hide Form Buttons for print mode

Postby sindelar » Wed Mar 28, 2007 7:42 pm

:cry: Work-a-round: using css tag to hide HTML4.01 (FORM "buttons") in print mode. Validates with Tidy Message Warning against embedding "p", "span", and other tags I've tried.
What can we do individually to regain Liberty & Justice?
sindelar
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 7
Joined: Wed Mar 28, 2007 11:08 am
Location: New York

Postby MikeGale » Thu Mar 29, 2007 12:21 am

If you post details of your source (markup and CSS) plus the message you should get better feedback.
User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
 
Posts: 612
Joined: Mon Dec 13, 2004 2:50 pm
Location: Tannhauser Gate

Postby sindelar » Thu Mar 29, 2007 1:01 am

Hi Mike,

<center><span class="noprint"><form action="button"><input type="button" value=" BACK " onclick="history.go(-1)"><input type="button" value="Main Menu" onclick="parent.location='Menu.html'"><input type="button" value="MENU" onclick="parent.location='LC.html'"><input type="button" value="TOP" onclick="parent.location='#Top'"><input type="button" value="FORWARD" onclick="history.go(1)"></form></span></center>

Thanks
Bob
Last edited by sindelar on Thu Mar 29, 2007 12:02 pm, edited 1 time in total.
sindelar
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 7
Joined: Wed Mar 28, 2007 11:08 am
Location: New York

Postby Albert Wiersch » Thu Mar 29, 2007 10:14 am

Hi Bob,

You can enclose block-level elements in "div" elements but not "span" elements. "form" is a block-level element. I think this is the problem. Please see:
http://www.w3.org/TR/html401/struct/glo ... l#edef-DIV

The DIV and SPAN elements, in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents. These elements define content to be inline (SPAN) or block-level (DIV) but impose no other presentational idioms on the content. Thus, authors may use these elements in conjunction with style sheets, the lang attribute, etc., to tailor HTML to their own needs and tastes.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2433
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Postby sindelar » Thu Mar 29, 2007 12:04 pm

Thanks Albert,

The code change to <div> worked great!

Bob
What can we do individually to regain Liberty & Justice?
sindelar
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 7
Joined: Wed Mar 28, 2007 11:08 am
Location: New York


Return to CSS (Cascading Style Sheets)

Who is online

Users browsing this forum: No registered users and 2 guests