supergrame Posted March 17, 2009 Share Posted March 17, 2009 here is the code .error1 { color:#ff0000; text-align:center; } $var = "<span class=\"error1\">Your username/password doesn't exist!</span>"; <?php if(isset($var)){ echo $var;} if(isset($wrong_un_pw)) {echo $wrong_un_pw;} in firefox the text is fine it shows red text then the table below it but not center in ie no red and ther is a gap between the text and the table ?!?!?!? Quote Link to comment Share on other sites More sharing options...
Silverado_NL Posted March 17, 2009 Share Posted March 17, 2009 try this, works here ie7 and firefox 3, u have there error msg in span tags, that arent made for aligning and stuff i think. div's do work:P echo' <style type="text/css"> .error1 { border:1px solid blue; box-width:500px; color:#ff0000; text-align:center; } </style> '; $var = "<div class=\"error1\">Your username/password doesn't exist!</div>"; 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...
dropfaith Posted March 17, 2009 Share Posted March 17, 2009 you cant center a span to my knowledge or you at least need a width oh and what is box=-width should be <head> <style type="text/css"> .error1 { border:1px solid blue; box-width:500px; color:#ff0000; text-align:center; } </style> </head> <body> <?php $var = "<div class=\"error1\">Your username/password doesn't exist!</div>"; if(isset($var)){ echo $var;} if(isset($wrong_un_pw)) {echo $wrong_un_pw;} ?> </body> all style elements like this gop in the head of your document by the way and shouldnt be placed in the actual content Quote Link to comment Share on other sites More sharing options...
Silverado_NL Posted March 17, 2009 Share Posted March 17, 2009 you cant center a span to my knowledge or you at least need a width already said so. oh and what is box=-width should be just width not box-width. yeah i know:P all style elements like this gop in the head of your document by the way and shouldnt be placed in the actual content just put it in there for testing reasons so i dont have to make a whole separate css file im just showing what he done wrong, with the span tags that's all, not gonna explain to him how css should be implemented. Quote Link to comment Share on other sites More sharing options...
supergrame Posted March 17, 2009 Author Share Posted March 17, 2009 yea i was trying to stay away from a div since its just one line of text but thank you now at least i no why it wont center, i must css is relay cool in some ways but my god it is very hard to get things looking the way you want it. chairs guys Quote Link to comment Share on other sites More sharing options...
supergrame Posted March 17, 2009 Author Share Posted March 17, 2009 oh yea also i have another problem this is my divs css div { border-color: #8080FF; border-style: solid; border-width: 1px; so is there away to take these properties off 1 div i dont want the boarder Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted March 17, 2009 Share Posted March 17, 2009 Give that Div an ID or a class and change the Rules for it, ie: no border. 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.