supergrame Posted March 17, 2009 Share Posted March 17, 2009 Hey, how would you define text colour within the open and close php tags? $var = "<font colour text="red">text</font>"; does that look right to you guys? Quote Link to comment Share on other sites More sharing options...
trq Posted March 17, 2009 Share Posted March 17, 2009 Font tags should no longer be used in favour of css but anyways, to demonstrate the proper php syntax it would be.... $var = "<font colour text=\"red\">text</font>"; or $var = '<font colour text="red">text</font>'; or $var = '<font colour text=\'red\'>text</font>'; or $var = "<font colour text='red'>text</font>"; Quote Link to comment Share on other sites More sharing options...
supergrame Posted March 17, 2009 Author Share Posted March 17, 2009 thank you, if i did my hole page with css i would have a css file bigger than my site lol. i have uses some css only for like divs and some text area fields and body, but that's what i don't get with css is it meant to be a really long page of code or am i doing something wrong. sorry of massive topic change Quote Link to comment Share on other sites More sharing options...
Lodius2000 Posted March 17, 2009 Share Posted March 17, 2009 yes, reeeeaaaaallly long, it should be an index of every styling choice on your webpage, so you can easily reference the different classes and ids, which in the end helps simplify your code... you think your css file would be long, you should see some of the commonly used framework php class definitions Quote Link to comment Share on other sites More sharing options...
supergrame Posted March 17, 2009 Author Share Posted March 17, 2009 for some reson this does not optput the text in red .error { color:#F00; } $var = "<font class=\"error\">error</font>"; <?php if(isset($var)){ echo $var;} if(isset($wrong_un_pw)) {echo $wrong_un_pw;} Quote Link to comment Share on other sites More sharing options...
Zane Posted March 17, 2009 Share Posted March 17, 2009 use instead of like thorpe said... shouldn't be used with CSS Quote Link to comment Share on other sites More sharing options...
supergrame Posted March 17, 2009 Author Share Posted March 17, 2009 well all it was is class="error" cant be used as a class?!?!? but when i changed it to error1 everthing was good i have added the text-alighn: center; property to .error and is still does not center is that becuase im putting that into a variable or some other reason. Quote Link to comment Share on other sites More sharing options...
supergrame Posted March 17, 2009 Author Share Posted March 17, 2009 and also i just found out that it only colours to red in firefox not IE GRR ??? Quote Link to comment Share on other sites More sharing options...
Lodius2000 Posted March 19, 2009 Share Posted March 19, 2009 then dont use font, use span see deprecated html tags http://www.codehelp.co.uk/html/deprecated.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.