css - How do I get text side by side in HTML inside div? -
how "basic"-link text on second image , these 2 images + text centered? looks post code, add more details question.
thanks!
here jsfiddle https://jsfiddle.net/fvg4c0j0/
<meta charset="utf-8"> <link type="text/css" rel="stylesheet" href="stylesheet.css"/> <body> <div id="container"><!---container---> <div id="header"> <h1>jordas</h1> </div><!--header--> <div id="nav"> <a href="index.html">etusivu</a> <br> <a href="page1.html">teltat</a><br> <a href="page2.html">palvelut</a><br> <a href="page3.html">yhteistiedot</a><br> </div> <div id="section"> <a href="page2.html"><h1>pro</h1></a> <a href="page2.html"><h1>basic</h1></a> <div class="main_block"> <div class="inner_block"> <img src=grafik/talt.png> </div> <div class="inner_block"> <img src=grafik/talt.png > </div> </div><!--mainblock--> </div> <div id="footer"> <h3>pop-up telttojen ykkÖnen </h3> </div><!--footer--> </div> <!--container--> </body>
and here css
<style> body{margin:0; padding:0; } #header { background-color:#ff6600; color:white; text-align:left; padding:2px; } #nav { line-height:30px; background-color:#fff000; height:350px; width:120px; float:left; padding:5px; } #section { width:350px; float:left; padding:10px; } #footer { background-color:#737373; color:white; clear:both; text-align:center; } #container { margin:auto; width:900px; text-align:left; overflow: hidden; } .inner_block { display: inline-block; text-align: center; width: 150px; height:200px; } img { width: 150px; } #basic { float:right; } </style>
<div class="main_block"> <div class="inner_block"> <a href="page2.html"><h1>pro</h1></a> <img src=grafik/talt.png> </div> <div class="inner_block"> <a href="page2.html"><h1>basic</h1></a> <img src=grafik/talt.png > </div> </div><!--mainblock-->
css :
.main_block{ text-align:center; width:750px; }
Comments
Post a Comment