...

View Full Version : input box accessing wrong css



machineartgirl
05-03-2009, 11:48 PM
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


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?

bdl
05-03-2009, 11:56 PM
Not a PHP question, more of a HTML/CSS question.

From your document source:


<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:


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.

machineartgirl
05-04-2009, 03:18 PM
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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum