I would like to create a full-sized div title that links to the top of the page and inside this div, there is a “page title” that links to the home page.
Doing this seems to not work: https://jsfiddle.net/9wscc5yy/
<a href="www.example.com">
<div id="header" style="width:100%; background-color: #fff">
<a href="www.google.com">www.google.com
</a>
</div>
</a>
So, I tried to create three divs next to each other with the middle div containing the “page title” and the remaining two divs floating left and right. Result: https://jsfiddle.net/vef0tt07/
<div id="header">
<a href="www.example.com">
<div style="float: left; width: 40%; background-color:#fff">
</div>
</a>
<a href="www.example.com">
<div style="float: right; width: 40%; background-color:#fff">
</div>
</a>
<a href="www.google.com">
<div style="overflow:hidden; text-align: center;">
<strong>Title</strong>
</div>
</a>
</div>
The new problem is that I don’t know how to let the side divs change the width so that they always reach the page title text.
Is there a better way to create a linked title inside a linked div?
, .