Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add style to echo [closed]

Tags:

css

php

I want to add a float right style to this php echo

<?php echo $PAGE->button; ?>
<?php } ?>
like image 258
Ma9ic Avatar asked Jun 06 '26 19:06

Ma9ic


2 Answers

In HTML:

<div class="foo">
    <?php echo $PAGE->button; ?>
    <?php } ?>
</div>

And in CSS:

.foo {
    /* some styles here */
}

Or just simply, but not recommended inline styling:

<?php echo "<div style='float: right;'>". $PAGE->button ."</div>"; ?>
like image 76
Darek Rossman Avatar answered Jun 09 '26 07:06

Darek Rossman


<?php echo "<div style=\"float:right;\">" . $PAGE->button . "</div>"; ?>
<?php } ?>

This will float the entire button to the right

like image 23
Manuel Avatar answered Jun 09 '26 09:06

Manuel