html - Bootstrap image even, odd position -
i developing cms costumer , have print data lint list (code included @ bottom) in , odd position. tried apply lot of ways doesn't works properly.
should include parent classes?
here corresponding code:
@extends('layouts.master') @section('content') @foreach($exhibs $exhib) <div class="row"> <div class="[ col-xs-12 col-sm-offset-2 col-sm-8 ]"> <ul class="event-list"> <li> <img class="img-responsive" style="nth-child(even) img { float: right; }" alt="independence day" src="{{ asset('/images/events/' . $exhib->img) }}" /> <div class="info"> <h2 class="title"> @if(app::getlocale() == "hu") <a href="{{ url::to('exhib/show/' . $exhib->id . '/hu') }}">{{ $exhib->title_hu }}</a> @elseif(app::getlocale() == "en") {{ $exhib->title_en }} @elseif(app::getlocale() == "tr") {{ $exhib->title_tr }} @endif </h2> <p class="desc"> @if(app::getlocale() == "hu") {{ $exhib->desc_hu }} @elseif(app::getlocale() == "en") {{ $exhib->desc_en }} @elseif(app::getlocale() == "tr") {{ $exhib->desc_tr }} @endif </p> </div> </li> </ul> </div> </div> @endforeach @stop
you cannot use nth-child selectors inline.
put in head of page instead:
<style> .event-list li:nth-child(even) img { float: right; } </style> and remove inline style images.
Comments
Post a Comment