Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    input box accessing wrong css

    I moved a php script from one html page to another, the only difference being the addition of a style.css sheet.

    original: http://miamifurnituremedic.com/service.php
    new: http://machineartinc.org/service.php

    according to firebug , the new site is formatting the last two check boxes according to the style.css sheet now and defaulting it to a width of 243 px, as are all the input boxes

    Code:
    input {
    background:#FFFFA0 none repeat scroll 0 0;
    border:1px solid #887C6E;
    font-size:1em;
    height:20px;
    margin-bottom:3px;
    padding-left:5px;
    width:243px;
    }
    how do you change the pixel width formatting code for just those two check boxes and leave the other input boxes with the 243 px? why is the input box defaulting to the style.css sheet instead of the original medic.css sheet?

  • #2
    bdl
    bdl is offline
    Regular Coder
    Join Date
    Apr 2007
    Location
    Camarillo, CA US
    Posts
    590
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Not a PHP question, more of a HTML/CSS question.

    From your document source:
    Code:
    <link href="layout.css" rel="stylesheet" type="text/css" />
       <link href="style.css" rel="stylesheet" type="text/css" />
      <link rel="stylesheet" href="medic.css" type="text/css">
    Your 'medic.css' stylesheet in it's entirety:
    Code:
    span.heading{
    	font-family:		verdana, sans-serif;
    	font-weight:		bold;
    	font-size:		x-large;
    	color:			#2A2A2A;
    }
    span.headtext{
    	font-family:		verdana, sans-serif;
    	font-weight:		bold;
    	font-size:		large;
    	color:			#2A2A2A;
    }
    
    span.field {
    	font-family:		verdana, sans-serif;
    	font-size:		small;
    	color:			#2A2A2A;
    }
    
    span.error {
    	font-size: 		large;
    	font-weight: 		bold;
    	font-family:		verdana, sans-serif;
    	color:			red;
    }
    Your 'medic.css' stylesheet is linked in after 'style.css', but there is no input style to override anything in 'style.css'. So whatever is referenced in 'style.css', if it's not what you want, you need to correct it or override it.

    You could use an inline style on the INPUT element you want to change only.

    Also, note your opening BODY tag is missing a closing >. For an XHTML STRICT document, that's a big one. I ran it through the W3C validator, you've got 143 errors on that page.

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you

    fixed almost all of the errors, as in moving php code from one page to another did not remove strict xhtml requirement.

    How can I set up a simple perhaps in-line over-ride for the check boxes to have a smaller pixel width? than the default input css of 243 px?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •