seany02 Posted April 21, 2009 Share Posted April 21, 2009 ive looked around quite abit last night and this morning and cannot find any information about php and css. Is it possible to combine the two? i.e control the position of php elements using css? Link to comment https://forums.phpfreaks.com/topic/155008-using-css-to-control-php-elements/ Share on other sites More sharing options...
Yesideez Posted April 21, 2009 Share Posted April 21, 2009 PHP is server side, CSS is client side. PHP can control CSS but CSS cannot control PHP. Link to comment https://forums.phpfreaks.com/topic/155008-using-css-to-control-php-elements/#findComment-815294 Share on other sites More sharing options...
MasterACE14 Posted April 21, 2009 Share Posted April 21, 2009 I think you mean... control the position of css elements using php? and the answer is yes. Link to comment https://forums.phpfreaks.com/topic/155008-using-css-to-control-php-elements/#findComment-815295 Share on other sites More sharing options...
seany02 Posted April 21, 2009 Author Share Posted April 21, 2009 Ok so I have this piece of php. I want to send it to the far right hand side of the page. How would I position this with css? <?php include("config.php"); $result = mysql_query("SELECT * FROM news ORDER BY newsid DESC",$connect); while($myrow = mysql_fetch_array($result)) { echo "<b>Title: "; echo $myrow['title']; echo "</b><br>On: <i>"; echo $myrow['dtime']; echo "</i><hr align=left width=160>"; echo $myrow['text1']; echo "<br><a href=\"read_more.php?newsid=$myrow[newsid]\">Read More...</a> || <a href=\"edit_news.php?newsid=$myrow[newsid]\">Edit</a> || <a href=\"delete_news.php?newsid=$myrow[newsid]\">Delete</a><br><hr>"; } ?> Link to comment https://forums.phpfreaks.com/topic/155008-using-css-to-control-php-elements/#findComment-815296 Share on other sites More sharing options...
kenrbnsn Posted April 21, 2009 Share Posted April 21, 2009 PHP generates HTML. Just put the correct CSS into the HTML lines. If you don't know the correct CSS, that is a different problem and this question belongs in the CSS area. Ken Link to comment https://forums.phpfreaks.com/topic/155008-using-css-to-control-php-elements/#findComment-815332 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.