user2951386
user2951386

Reputation: 261

Didn't display text top of the image

I'm using codeigniter and in my view php page I need to display text top of the image.Text is render from the database and need to display top of the image also text need to be rotate to display

this is the image that is text need to bee display

enter image description here

I'm using Bootstrap(not twitter Bootstrap) and jquery.I try to do display text image top of like this but it is not display.how can i fix this problem?

this is the code that is try

<button class="btn btn-danger" id="buy-btn" data-toggle="modal" data-target=".package-buy-modal">BOOK NOW</button>
                <img id="price-tag" style="position: relative;width: 100%; /* for IE 6 */" src="<?php echo base_url()?>assets_profile/img/price.png">
                <p style="-o-transform: rotate(32deg);-moz-transform: rotate(32deg);-webkit-transform: rotate(32deg);">$<?php echo $car_data['Charges']; ?></p>

Upvotes: 0

Views: 93

Answers (1)

Patrick
Patrick

Reputation: 3367

Codeigniter has nothing to do with your question, this is simple CSS :)

Create a container div for both the image and the text(or other images) you wish to add. Set everything position to relative.

The large image can be the div's background while the inner text/images can be set absolute and be positioned as you wish.

For example(and excuse minor syntax issues if they exist)

<div style="background-image('IMAGE/PATH');position:relative">
<p style="position:aboslute"> SOME TEXT HERE </p>
</div>

Upvotes: 1

Related Questions