4
I have been working on a project that requires the implementation of a request that takes advantage of the white spaces to be placed advertising banners. I deal with a structure already determined and several times I have problems of implantation of something new, having to sometimes appeal to some non-semantic attitudes.
The design follows a model that looks like this (the original has MANY classes and I don’t have full access, so the model):
<div class="borda-background">
<ul class="menu-container">
<li class="departamento">
<a href="#">Categoria</a>
<ul class="categoria-container">
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
</ul>
</li>
<li class="departamento">
<a href="#">Categoria</a>
<ul class="categoria-container">
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
</ul>
</li>
<li class="departamento">
<a href="#">Categoria</a>
<ul class="categoria-container">
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
</ul>
</li>
<li class="departamento">
<a href="#">Categoria</a>
<ul class="categoria-container">
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
<li class="categorias-opcoes"><a href="">Lorem Ipsum</a></li>
</ul>
</li>
</ul>
</div>
However, when trying to introduce a banner in an extra li in each category, for example, I do not succeed, because Heights vary from one browser to the other. The intention would be to achieve this model with a 1000px container and with the image always adapting according to the number of "Rows" of each department:
Man, personally, it’s hard to help out like that.. There are numerous ways to create CSS to meet your goal... Not at least something ready to give as an example? Any site with the same procedure you have seen and etc..
– MarceloBoni
We have a real example posted on the site, but with these cross browser bugs. In fact, I end up not posting the information due to the original structure of the code that is very decaying, and being generated by others, not on my part.
– jhonnymoreira
You can use javascript to grab the height of ul menu-container and apply it to the height of your image.
– dsantoro
Where is the relevant CSS for these classes?
– Chun