Anshul
Anshul

Reputation: 179

How do I write the following html code in codeigniter using HTML helper's functions?

New to codeigniter. I am having trouble in writing the following HTML code using HTML helper's functions :

    <a href="" title="">
     <?=img( ["src"=>'images/LOGO.png', "height"=>"50", "width"=>'350',"style"=>"margin-left:-60px"]) ?>
<h5 style="position: absolute;color:black;top:40px;z-index: +99999;margin-left: 30px;font-weight: bold">Tours & Travels</h5> 
</a>

I tried it myself and wrote the following :

 <?= anchor("incredible_ukd" ,heading("Tour & Travels",5,"style= position: absolute;color:black;top:85px;z-index: +99999;margin-left: 30px;font-weight: bold"), img( ["src"=>'images/LOGO.png', "height"=>"50", "width"=>'350',"style"=>"margin-left:-60px"])  ) ; 

    ?>

But it is isn't working properly. Help please

Upvotes: 1

Views: 66

Answers (1)

JC Sama
JC Sama

Reputation: 2204

What about this :

<a href="<?php echo site_url('/') ?>">
    <?php echo img( ["src"=>'images/LOGO.png', "height"=>"50", "width"=>'350',"style"=>"margin-left:-60px"]); ?>
    <?php echo heading('Tours & Travels', 5, 'style="position: absolute;color:black;top:40px;z-index: +99999;margin-left: 30px;font-weight: bold"'); ?>
</a>

Upvotes: 1

Related Questions