Why won't my products li wrap around my image? I need them to wrap around my floated image
Thank you in advance for any help, this has me wanting to throw my computer across the room! I don't understand why my ul products li are not wrapping around an image I added. I think this would be a CSS solution but just in case, here's what I did in the php:
In my archive-product.php file I added:
<?php if ( is_product_category() ) {
if ( is_product_category( 'cubicles' ) ) {
echo '<div class="cubicles"><img src="/wp-content/uploads/2015/05/menu_cubicles.jpg"></div>';
} ?>
And the styles attached to that are:
body.archive .cubicles {
height: 347px;
width: 220px;
float: right;
margin-right:0;
}
Here is the live link: http://dev.arnoldsofficefurniture.com/product-category/cubicles
Since it's floated right and the ul products li are floated left, I don't get why they aren't wrapping. I also don't get why the li are not consistently lined up and getting pushed down, if they are all the same height. Thanks in advance!
Solutions
The reason it's not dropping under the cubicles area is because there isn't enough room. The entire area for the products is 975px wide. Each product
list item
is 220px plus 30px right margin. Simple math... 250 * 4 = 1000. If you remove the cubicle, you'll still only have three products per line.
You need to rework your width/margin-right to fix it.
Similar questions
Working with centering floated li elements with no width in CSS
I'm trying to work with an issue I've had before with CSS with Wordpress and would like to get an extra few sets of eyes on it to see if in fact what I'm doing is the best way for it or is there is a better way. I'm setting a social media section within my main in the header and footer of my website. My "social media bar" is however not a set size ...
Center two divs floated left inside parent container
I have been trying to solve this for hours now with no luck. I am trying to center a Wordpress masonry style gallery and I can not for the life of me get it to work. I have looked all over the internet trying to find out how to do it with no luck. I basically want the images to be centered inside the parent container let's say the parent container ...
How do I change the style of an existing Wordpress menu to be Floated and horizontal?
Please check : http://shoejunction.net/ In the top menu, if you put your cursor on Shoes by Brand, it will show a really long list of items. I want these items to be in a floating square drop down. So it will fit inside the page (the top menu goes down with you if you scroll down the page). Is it possible to change it's style to do that? I tried Me...
Having trouble changing opacity when hovering over a floated div
I've made a JS Fiddle here which is working correctly, however it is not workingin my development site. http://jsfiddle.net/yr7rmho0/ Site is running Wordpress, and the link above contains a condensed version of what's on my site. Basically, I have a Wordpress sidebar item, wrapped in <li> tags. I am adding a class to this tag to make it floa...
Left Floated Div not showing colour after clearfix
Yeah first off sorry to be a pain I've seen this question up loads already. It's just the answers that seem to work for everyone else are not for me. Basically I want a few Div's to run as a tile style menu on a page of mine. Similar to the windows menu I added a pic of. windows menu I only want a maximum of 6 tiles in 3 rows of 2 I want them all t...
Vertically centre child in floated parent
Question: Is it possible to vertically centre a child element in a floated div in relation to the dynamic height of a floated div along side it? Desired result Background: I'm using a WordPress theme which has shortcodes for creating columns. The columns are created through floated divs. As such, I'd like to stick to using float, instead of using a...
Also ask