vendredi 3 avril 2015

Responsive text next to image

I have text next to an image. I am using AngularJS so that text dynamically changes. I want that text to fit next to that image no matter what and not spill over. I've fiddled around with CSS for about an hour now and no hope (not a big CSS fan).


CSS:



.album-art{
float: left;
height: 115px;
width: 115px;
margin-left: 15px;
margin-right: 15px;
}

.player{
background-color: black;
}

.now-playing-text {
color: white;
float:left;
}

.gotham-bold-text {
font-family: gotham-bold;
}

.gotham-book-text {
font-family: gotham-book;
}

.playing-text {
width: 100%;
height: 130px;
display: block;
}


HTML:



<ion-view title="Now Playing">
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
<ion-content class="player">
<div class="now-playing">
<canvas class="visualizer"></canvas>
</div>
<div class="container-text">
<div class="playing-text"><img class="album-art" src="{{art}}"><h1 class="now-playing-text"><div class="gotham-bold-text">{{title}}</div></h1></div>
</div>
</ion-content>
</ion-view>

Aucun commentaire:

Enregistrer un commentaire