Page 1 of 1

CSS and PHP

Posted: Thu Jun 23, 2005 8:03 am
by saxon
Hello I'm John :D

At the minute I'm making a file uploader in PHP, that can have multiple thems and languages.

The problems I have came across

1. Languages

I would like to use a file that contains all of the language strings in there.

the index file uses

Code: Select all

require_once ("language/lang_english/lang_main.php");

include ("template/---/header.tpl");
include ("template/---/main.tpl");
include ("template/---/footer.tpl");
The language file defines all of the strings

Code: Select all

define ($register, "Register");
My main problem is gettin the $register to change on the HTML form. How do you change $register on the HTML form that is included by the index.php to change to "Register"?

2. The CSS works for all of the links but fails to do normal text. My page
uses php to include all of the pages but it fails to change the style of the other text.

Code: Select all

table.main {
	border-width: 2px 2px 2px 2px;
	border-spacing: 2px 2px;
	border-style: outset outset outset outset;
	border-color: gray gray gray gray;
	border-collapse: separate;
	background-color: rgb(0, 0, 0);
	color: #FFFFFF
}
table.main th {
	border-width: 1px 1px 1px 1px;
	padding: 1px 1px 1px 1px;
	border-style: none none none none;
	border-color: gray gray gray gray;
	background-color: rgb(0, 0, 0);
	-moz-border-radius: 0px 0px 0px 0px;
	color: #FFFFFF
}
table.main td {
	border-width: 1px 1px 1px 1px;
	padding: 1px 1px 1px 1px;
	border-style: none none none none;
	border-color: gray gray gray gray;
	background-color: rgb(0, 0, 0);
	-moz-border-radius: 0px 0px 0px 0px;
	color: #FFFFFF
	font-size: 10pt;
}

body {
	background-color : #000000;
	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 10pt;
	color : #FFFFFF;
	margin: 0px; 
      }

a {
	color: #FFFFFF;
	font-size: 10pt;
	text-decoration: none;
	font-weight: bold;
  }
a:hover {
	color: #CCCCCC;
	font-size: 10pt;
	text-decoration: underline;
	font-weight: bold;
  }
Basically I want all of the fonts to be 10pt and normal font, but they seem to be larger and does not chnage.

http://www.saxonian.co.uk/imagehost/

Any help is appreiciated



John

Posted: Thu Jun 23, 2005 12:29 pm
by s.dot
define your font settings in your table th & td classes

Code: Select all

table.main {
// your settings
font-family: font;
font-size: 10pt;
font-color: color;
}

table.th {
// same as above
}

table.td {

// same as above
}
And as far as echoing "register", you'd have to have a way of knowing which language they are using, perhaps include an "&lang=english" in the URL, then select the proper language based on that and print it to the browser.