pcjames Posted June 22, 2007 Share Posted June 22, 2007 Hi All, another newbie question here! I've managed to get my statement working without breaking my script, but for the life of me I can't figure out how (or if it's poss) to make the 2nd part of my statement to align right. My complete statement below if(mysql_num_rows($reviews_query) > 0) { $info_box_contents[][0] = array('align' => 'left', 'params' => 'class="Info" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>' . '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_all_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>' ); } In the line below is where I'm trying to get the 2nd part to align right 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>' . '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_all_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>' ); This part of the code is what I'm trying to get align right '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_all_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>' ); Thanks in advance for any help, James Link to comment https://forums.phpfreaks.com/topic/56749-solved-how-to-set-align-in-a-statement/ Share on other sites More sharing options...
cooldude832 Posted June 22, 2007 Share Posted June 22, 2007 thats a css issue just add your <span class=\"align-right\"> infront of the <a href="... and close when done Link to comment https://forums.phpfreaks.com/topic/56749-solved-how-to-set-align-in-a-statement/#findComment-280245 Share on other sites More sharing options...
pcjames Posted June 23, 2007 Author Share Posted June 23, 2007 Thanks cooldude832, I knew it was HTML I just didn't know how to include it in my statement and although your reply wasn't exactly what I was looking for it sure got the wheels turning inside my head which resulted in me solving my issue. So Thanks Great Job! In case someone else wants to know I'll include the code in what I was trying to achieve. </td>' . '<td align="right"><a href=" I'm still new to php and still don't know how the <td> is created in the statement but when I viewed the page source I seen my statement was within a < td > Therefore I included a closing < /td > and started a new < td > and added my alignment and it worked like a charm. Thanks again cooldude832! James Link to comment https://forums.phpfreaks.com/topic/56749-solved-how-to-set-align-in-a-statement/#findComment-280625 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.