plus-minus image alignment issues
- muesliflyer
- Offline Topic Author
- New Member
- Posts: 2
- Thanks: 0
Hi Cedric,
many kudos for providing this nice module.
I was running in some formatting issues when eventtarget = image.
But this only works when the img is aligned right. You may want to find a better solution that works more generally and with different img sizes (mine is 16x16px). A better solution might be to make the img display in line with vertical-align=middle. But I didn't test it.
I also noticed, that when you align the image left and have (outside) bullets on your menu items, the img is placed between the bullet and the text, which looks a bit strange.
Here you can see what it looks like with my hack.
Cordialement.
muesliflyer
many kudos for providing this nice module.
I was running in some formatting issues when eventtarget = image.
- In that case you are using and img tag with align=right/left to create the plus or minus sign. Out of the box the positioning of the signs is not ideal. They stick to the top of the menu item and are not nicely centered in line with the menu text. (It does work nicely if eventtarget=link).
- The cursor on the image should be the pointer.
- Aligning an img left or right makes it float to that place and any padding of an adjacent anchor overlaps with the floated img. If the padding is too small, this can lead to the menu text to touch the img.
Code:
img.toggler {
cursor: pointer;
padding-top: 6px; /* kludge to get it better vertically centered. */
}
<?php echo $id; ?> li a {
padding-right: 20px;
...
}
I also noticed, that when you align the image left and have (outside) bullets on your menu items, the img is placed between the bullet and the text, which looks a bit strange.
Here you can see what it looks like with my hack.
Cordialement.
muesliflyer
by muesliflyer
Please Log in or Create an account to join the conversation.
Hi
have you tried to add a display:block like this :
else give me your url
CEd
have you tried to add a display:block like this :
Code:
<?php echo $id; ?> li a {
display:block;
else give me your url
CEd
Joomlack Webmaster and Developer
by ced1870
Please Log in or Create an account to join the conversation.
- muesliflyer
- Offline Topic Author
- New Member
- Posts: 2
- Thanks: 0
Replied by muesliflyer on topic plus-minus image alignment issues
Posted 10 years 9 months ago #12457It was already a block. To get a margin between a block and a float, the float must have a margin/padding - the block's margin is ignored here. So, a partial solution would be to add a left margin/padding to the img (if it is align=right). However this doesn't solve the vertical positioning issue for the img. Inline-blocks might be a solution if we don't want to use tables.ced1870 wrote: Hi
have you tried to add a display:block like this :Code:<?php echo $id; ?> li a { display:block;
See the last sentence in my previous post.else give me your url
CEd
by muesliflyer
Please Log in or Create an account to join the conversation.
ok I have seen the "here" in your post
I see that is renders correctly. I will try to improve my themes in the future
CEd
I see that is renders correctly. I will try to improve my themes in the future
CEd
Joomlack Webmaster and Developer
by ced1870
Please Log in or Create an account to join the conversation.
Time to create page: 0.695 seconds