Problem with UL/LI styling
Problem with UL/LI styling
Please, have a look at http://164xh.cmsimple.sk.
The yellow background is defined just for better view of other stylings. It should cover the whole menulevel1. But it obviusly doesn't and I can't find what attribute to use, to have the UL accepting the height of the green circles (menulevel1 li) and to adjust its height when using narrow screen.
The yellow background is defined just for better view of other stylings. It should cover the whole menulevel1. But it obviusly doesn't and I can't find what attribute to use, to have the UL accepting the height of the green circles (menulevel1 li) and to adjust its height when using narrow screen.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Problem with UL/LI styling
Um, I can't see any yellow and green background there.
Christoph M. Becker – Plugins for CMSimple_XH
Re: Problem with UL/LI styling
True, no yellow or green in the template.
I hope I have understood you correctly. Here a proposal.
I hope I have understood you correctly. Here a proposal.
Code: Select all
ul.menulevel1 {
height: 4rem;
display: inline-block;
background-color: #FF0;
margin: 0;
padding: 0;
}
.menulevel1 li {
width: 200px;
display: block;
padding: 0.5rem;
margin: 0 0.1rem 0.1rem 0;
float: left;
text-align: center;
background: #DDD;
color: #F00;
height: 3rem;
line-height: 3rem;
}
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“ Ludwig's XH-Templates for MultiPage & OnePage
Re: Problem with UL/LI styling
Hm, I don't understand it, but you should see this webpage (the green circles are melevel1 li styled by border-radius:50%)
[ external image ]
[ external image ]
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Problem with UL/LI styling
I'm seeing a similar website, but the menu is above the slider, and there are no circles.Tata wrote:Hm, I don't understand it, but you should see this webpage
Anyway, from looking at the screenshot it seems to me that the <li>s are floating, and as such will not occupy space in the <ul>, unless a block formatting context is established. See http://3-magi.net/demo/float-clear.html for several alternative solutions.
Alternatively, you could set a height for <ul> as suggested by Ludwig.
Christoph M. Becker – Plugins for CMSimple_XH
Re: Problem with UL/LI styling
Ah , i see. In the online-testsite is template "fullscreen" active. It should be "bignavigation". Change please config.php.
Well, anyway, I can select it under the menu item of templates.
Well, anyway, I can select it under the menu item of templates.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“ Ludwig's XH-Templates for MultiPage & OnePage
Re: Problem with UL/LI styling
Now I solved something.
Now it works with the height of the <ul> but the "cells" however behave "responsive" and the text is placed top. Set I the "cells" behave responsive instead of moving to a new row and the text still remains on top.
Code: Select all
.menu ul{
color: #ffaa00;
background: yellow;
display: table-row; /* !!! */
}
.menulevel1 li{
list-style: none;
width: 250px;
height: 250px;
border-radius:50%;
vertical-align: center;
font-size: 2rem;
background: #009900;
display: table-cell; /* !!! */
box-sizing:border-box;
border: 0.5rem solid #1e1e1e;
}
Code: Select all
menulevel1 li{...
float: left;
...}
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Problem with UL/LI styling
As you already have display:table-cell, just add vertical-align:middle to have the text vertically centered.Tata wrote:Now it works with the height of the <ul> but the "cells" however behave "responsive" and the text is placed top.
Christoph M. Becker – Plugins for CMSimple_XH
Re: Problem with UL/LI styling
I have tried this before, but it has no impact.cmb wrote:As you already have display:table-cell, just add vertical-align:middle to have the text vertically centered.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Problem with UL/LI styling
Works fine here (current Chrome and Firefox).Tata wrote:I have tried this before, but it has no impact.
PS: Ah, you have set vertical-align:center; it has to be vertical-align:middle (I confuse these most of the time, too).
Christoph M. Becker – Plugins for CMSimple_XH