Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 3rd, 2006, 08:16 AM
Registered User
Join Date: Jan 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default hidden input fields and Mozilla


I have a problem with mozilla with hidden fields. I have declared input in my style sheet as such,

input, select {
    background-color: #DDD;
    font-size: 12px;
    border: 1px solid #000000;

label, input, select {
    display: block;
    width: 150px;
    float: left;
    margin-bottom: 10px;

The problem is that Mozilla renders hidden fields with this style drawing a line 150px X 2px where ever there is a hidden field. Is there a way to declare a class for hidden input elements (eg hidden:input) to have border:0px; margin:0px or do I have to go through my code placing all the hidden fields in a class?

Unfortunatly I am working locally so I cannot link to the site in question.

Old February 3rd, 2006, 05:45 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts

Yeah, you could give all <input type="hidden" a class. But since your concern is Mozilla you can use an attribute selector (IE doesn't understand them).

input[type=hidden] { display: none }


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i restore <input type="hidden"> 's value ? yamunchien ASP.NET 1.0 and 1.1 Basics 4 March 18th, 2006 08:45 PM
Changing textboxes to hidden fields - HELP!!! jroxit ASP.NET 1.0 and 1.1 Basics 4 February 10th, 2006 07:46 PM
Creating hidden fields SmoothAl BOOK: Beginning ASP 3.0 0 February 6th, 2005 01:44 AM
empty fields not hidden anymore (php/mySQL) jasmin Beginning PHP 1 January 17th, 2005 12:42 PM
CH3, pg 96 Hidden Form Fields wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 19 October 28th, 2003 03:18 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.