Hassam Ali Hassam Ali - 1 month ago 9
CSS Question

Adjusting bootstrap classes and dive

i want to adjust Add Admin button in the front of admin lists and float left but i dont know where i am doing a mistake , code and screenshot is above

Screen Shot

My Code is ( Bootstrap with cakephp2 )

<div id="page-content" class="col-sm-12">

<h2><?php echo __('Admin Lists'); ?></h2> <h2><?php echo $this->Html->link(__('New Admin'), array('action' => 'add'), array('class' => 'pull-right btn btn-primary')); ?></h2>




<div class="users index">

<div class="table-responsive">

Answer

To float the button to the left you need to use pull-left css class, not pull-right:

<h2><?php echo $this->Html->link(__('New Admin'), array('action' => 'add'), array('class' => 'pull-left btn btn-primary')); ?></h2>

Or remove the pull-right class completely as it is not necessary:

<h2><?php echo $this->Html->link(__('New Admin'), array('action' => 'add'), array('class' => 'btn btn-primary')); ?></h2>

Not 100% sure what you mean by saying "adjust Add Admin button in the front of admin lists", but I believe you just need to switch your heading tags around:

<!-- first -->
<h2><?php echo $this->Html->link(__('New Admin'), array('action' => 'add'), array('class' => 'pull-right btn btn-primary')); ?></h2>
<!-- second -->
<h2><?php echo __('Admin Lists'); ?></h2>