CSS Tag to hide Form Buttons for print mode

Discussion about CSS related issues.
Post Reply
sindelar
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 7
Joined: Wed Mar 28, 2007 11:08 am
Location: New York
Contact:

CSS Tag to hide Form Buttons for print mode

Post by 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?

User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 706
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Post by 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.

sindelar
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 7
Joined: Wed Mar 28, 2007 11:08 am
Location: New York
Contact:

Post by 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.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3407
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Post by 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

sindelar
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 7
Joined: Wed Mar 28, 2007 11:08 am
Location: New York
Contact:

Post by 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?

Post Reply