html - Floating of image float footer also -



html - Floating of image float footer also -

i have bit problem floating of image.

i have simple page, have header article, perex , image of article, in 1 container contains footer @ bottom.

i want image on left side of container, text floating around image right side, padded image few px, under header , footer should under whole thing, in container.

but when m trying float text around image, doing this.

here html:

index.html.twig

{% extends 'natalycooksblogbundle::layout.html.twig' %} {% block content %} <article class="article"> <header> <h1> header of article </h1> </header> <img class="pure-img article-image" src="{{ asset('uploads/articles/bug2.png') }}" float="right"> <p class="perex"> perex </p> </article> {% endblock %}

layout.html.twig

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="a layout illustration side menu hides on mobile, pure website."> <title>side menu &ndash; </title> <link rel="stylesheet" href="{{asset('admin/css/pure-min.css')}}"> <link rel="stylesheet" href="{{asset('frontend/style.css')}}"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <!--[if lte ie 8]> <link rel="stylesheet" href="css/layouts/side-menu-old-ie.css"> <![endif]--> <!--[if gt ie 8]><!--> <link rel="stylesheet" href="{{asset('admin/css/layouts/side-menu.css')}}"> <!--<![endif]--> </head> <body> <div class="pure-g"> <div class="pure-u-5-5 container"> <div class="header"> </div> <center> <div class="pure-menu pure-menu-open pure-menu-horizontal"> <a href="#" class="pure-menu-heading">site title</a> <ul> <li class="pure-menu-selected"><a href="#">home</a></li> <li><a href="#">flickr</a></li> <li><a href="#">messenger</a></li> <li><a href="#">sports</a></li> <li><a href="#">finance</a></li> </ul> </div> </center> {% block content %} {% endblock %} <footer class="footer"><br>created nami production, 2014</footer> </div> </div> <script src="{{asset('admin/js/ui.js')}}"></script> </body> </html>

style.css

body { background-color: mintcream; } .container { background-color: #ffffff; margin-left: 20%; margin-right: 20%; border-bottom: none; /*margin-right: 20%;*/ } .header { width: inherit; padding-top: 30px; border-bottom: none; } .menu-center { padding-left: 12%; } .article { text-align: center; } .perex { text-align: left; padding-left: 5%; padding-right: 5%; float: right; } .article-image { padding-left: 5%; max-width: 35%; float: left; } .footer { height: 50px; background-color: greenyellow; color: #000000; font-size: 100%; text-align: center; }

add next css contentblock(there has class, tag, or id it):

.yourclass:after{ clear:both; content:''; display:block; }

html css image

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -