CSS | Footer with Logo -
hey started learn html @ work. so, started make website fake company.i made navigation logo , side navigation. footer got problem, cause not in row.
html code:
<div id="footer"> <ul class="footer"> <li class="fuss"><a href="#">agb</a></li> <li class="fuss"><a href="#">impressum</a></li> <div class="wortmarke"> café villa bernstein <p class="copyright"> © café villa bernstein. rights reserved. </p> </div> <li class="fuss"><a href="#">datenschutz</a></li> <li class="fuss"><a href="#">pressenews</a></li> </ul> </div>
css:
/* footer */ ul.footer { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; position: fixed; bottom: 0; width: 100%; } li.fuss { float: left; width: 10% } li.fuss { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } .wortmarke { color: #ffc995; font-size: 150%; text-align: center; width: 40%; } p.copyright { font-size: 40%; margin: -4%; color: white; }
as can see have 4 links (agb, impressum, datenschutz , pressenews), between impressum , datenschutz want add logo text "café villa bernstein" , below " © café villa bernstein. rights reserved.". problem when remove "logo text" in row. when add "logo text" - 2 links "datenschutz" , "pressenews" jumps next row
now there 1 little thing forgot ask. want white border between 2 links ( agb & impressum , datenschutz & pressenews). when add border-right: 1px solid white
on left side of datenschutz there missing white border. so, add border left: 1px solid white
. border between agb & impressum , datenschutz & pressenews getting fat. question is: how between elements same border
what did is:
li.fuss { float: left; width: 15% }
now li , middle div can 'cover' whole footer (4*15% + 40% = 100% width).
i added float:left in .wortmarke :
.wortmarke { color: #ffc995; font-size: 150%; text-align: center; width: 40%; display:inline-block; float:left; }
so floating rest of li.
finally, remove block completely:
ul li:nth-child(4), ul li:nth-child(5) { float:right; margin-right: 20px; }
as unnecessary, not-responsive , not support cross-browser compatibility
Comments
Post a Comment