Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

stuck with html_output.php


betty

Recommended Posts

Posted

Does anyone know where classes are defined for checkboxes, input boxes etc?? Obviously, I know they have their own styles in the stylesheet, and I'm pretty sure it's html_output.php which sets out which types of input boxes are assigned which styles, but I just can't how or where so I can change them.

 

(I want to specify different styles for input boxes, checkboxes and radio buttons, but at the moment the style i've given for input boxes in the stylesheet is being applied to all of these and i want to stop it.)

 

This page will show you what i mean - http://www.cukoo.co.uk/create_account.php

 

Please help!

 

Betty.

Posted

The default stylesheet has those objects grouped together:

CHECKBOX, INPUT, RADIO, SELECT {
?font-family: Verdana, Arial, sans-serif;
?font-size: 11px;
}

 

Just change it and give each object it's own individual style:

 

CHECKBOX {
?font-family: Verdana, Arial, sans-serif;
?font-size: 14px;
}

RADIO {
?font-family: Verdana, Arial, sans-serif;
?font-size: 11px;
?font-weight: bold;
}

SELECT {
?font-family: Verdana, Arial, sans-serif;
?font-size: 11px;
?color: red;
}

INPUT {
?font-family: Verdana, Arial, sans-serif;
?font-size: 11px;
}

I'd rather be flying!

Posted

Hi! Thanks very much for replying Bluepony, but I already did that and it doesn't seem to make any difference. At the moment my stylesheet looks like this:

 

CHECKBOX {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
border: none;
}

SELECT {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
border: none;
}

RADIOBOX {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
border: none;
}

INPUT {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #FFFFFF;
border: #666666;
border-style: solid;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
}

 

but I'm still getting this as the output:

 

http://www.cukoo.co.uk/create_account.php

 

(it's even putting a border round the continue button, and I just can't see anything in my code that's telling it to do this!)

 

Does anyone else have any ideas??

 

Betty

Posted

The problem is that all of these are "input" types. So the border around the input is applying to all types.

 

Specifying the input type should fix it:

 

INPUT.CHECKBOX {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
border: none;
}

INPUT.SELECT {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
border: none;
}

INPUT.RADIOBOX {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
border: none;
}

INPUT {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #FFFFFF;
border: #666666;
border-style: solid;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
}

I'd rather be flying!

Posted

Bluepony you're a GENIUS!! that's brilliant - thanks ever so much. i really appreciate it - it's being baffling me for ages!

 

Betty

Posted

Hi - sorry, me again! bluepony's fabulous advice has fixed most of my problems, but i'm still getting a border around all of my form submit buttons that i don't want. i can't see a style in my stylesheet which specifically defines form submit buttons, but was wondering if i could perhaps make one up and change the code somewhere in html_output to point to it???

 

maybe in this section??

 

// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

   $image_submit .= '>';

   return $image_submit;
 }

 

 

Sorry to bang on about it - i'm just not sure how/where i could do this. would appreciate any ideas!!

 

Betty

Posted

Try this:

 

// Outputs a button in the selected language
function tep_image_submit($image, $alt = '', $parameters = '') {
? global $language;

? $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" style="border: none;" ?alt="' . tep_output_string($alt) . '"';

? if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

? if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

? $image_submit .= '>';

? return $image_submit;
}

 

I just added an inline style to hide the border.

I'd rather be flying!

Posted

Bluepony i love you! thanks so much - it works a treat. never knew about inline styles before...

 

betty

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...