"holes" in grid layout, Zurb Foundation - html

Can anyone tell me why I might have seemingly random "holes" in my grid layout? I'm using Zurb Foundation.
Even though it is a basic grid layout, some columns floats to the right for no apparent reason. It looks like there is an article missing once in a while, but if you look in the markup, you will se that there are no empty divs pushing things around and the div elements seems to have the same classes and styling?
There are no actual items left out - everything from the database is printed, but the holes are "consistent" in terms of where they are relative to the surrounding items, so it seems like it is related to the content, but I can't see anything in the content suggesting that the problem should lie here.
Link to the site

try adding min-height to the divs medium-6.
.medium-6 {
width: 50%;
min-height: 270px;
}

Related

I have two flexboxes that occupy the same space but I want them to be next to one another

I am pretty new to HTML and CSS, and one of the things I have read is that you should keep your <header> and <main> tags separate. When I do this, however, it makes it harder for me to align content on a page the way I want. Currently I'm having issues with the content of the main overlapping with the content of the header elements, and they are both occupying the same space. I tried setting the :root to display: flex;, and then flex-direction: column;, but this didn't seem to prevent the elements from overlapping. I would like them to behave as if the header and main were both in the same flexbox and aligned in a single column, but so far I haven't seen anything addressing this issue. I have attached a Codepen link of what I have so far (the borders in the CSS were just to help me visualize where things were going wrong).
After continuing to mess around with some of the values in the CSS selectors, I found that the one causing the issue was the position: fixed. I knew that I wanted the nav-bar to remain at the top of the screen when scrolling, but I didn't fully understand the implications of having other elements in the same page as a fixed element, without using a relative parent.
When I used position: fixed; it caused that element to essentially be disregarded from the normal flow of the page, and other elements filled the top, making them appear stacked on top of one another. In my particular case, I chose to go with sticky instead, as this accomplishes the same objective without complications.

horizontal align images html

First off, i'm not really a good coder. I'm an IT but more of an infra guy but i do understand concepts about coding and maybe a bit of a good grasp about it. I am working with my website and it's under construction using wordpress. In my homepage, i plan to do it simple as it is and decided to use the page builder and use text or HTML (or any language) to maximize it. I hope some one can help me. I would really appreciate it.
Here it is:
homepage
Those images have onmouseover style and was able to do it.. the thing is i can't arrange it horizontally. :( and unable include arrow so they can move left or right to see each images :(.
I know i can also do the same on the icon part the moment someone help me about the concept i wanted.
Your question is pretty ambiguous as to the specific context of the solution.
However, in general the reason why things don't align horizontally when rendered on screen in a browser, is that most elements (including the popular <div>) have a default styling of display: block; which makes it take up the full width of its parent item if the parent itself has the same styling (cascading of this is a different discussion).
The general solution to this is to define the widths of the elements. And they will be placed on the same line to the extent that the widths of the elements allow for more than one to appear on the same line.
One way to solve this is to have elements widths defined in some way. This could be by applying a class with a width: 25%; for example. This would allow for 4 elements with the same width to fit on the line.
Alternately you can also set the display property value of the elements you want on the same line to inline-block. This will make those elements take the width of it's content (unless the content has no width specified). This will cause the elements to flow along the horizontal line like text would (it will re-flow on the resizing of it's parent element), until there are no more contiguous items containing the inline-block display property.
Since your description also showed carousel style navigation for these rows of items, it may be that these are not the full solutions you are looking for.
If you are using the Bootstrap framework, there is a built-in carousel feature which you could use to contain these horizontally aligned elements on separate "pages" of the carousel. Making this solution fully responsive is another challenge altogether.

Alignment across table rows of divs with dynamic height (fluid layout) - CSS

I'm working on a mobile site, which has a fluid layout. On the main page, I have a table which contains a few products.
Each product has 3 divs: product-image, product-name and prices-container.
I can't seem to figure out how to align the prices-container div horizontally across the table-rows.
I'm thinking that there would be 2 approaches to this problem: either product-name always takes the height of the highest product-name across the table-row, either prices-container always sticks to the bottom of my product table-cell. Can't seem to figure out how to apply any.
Here's an illustration of the problem.
Left image shows my problem and right image shows how I would like it to be.
This wouldn't be a problem if product-name would have a fixed height, but due to the fact that this text is dynamic, I cannot know what height it will have. Might be one line of text, might be 10 lines.
I created a CodePen, where you can check my code and the problem >>here<< (I know it looks ugly, using background-colors to figure out faster what's happening).
I'm using Jade for my HTML and Stylus for my CSS.
Limitations:
- must be CSS & HTML only, I would prefer not using Javascript
- solution must be suitable for fluid layout (width is set with percentage)
- cannot use a fixed height of product-name, this being a dynamic text
Any ideas how to do this? Thank you! :)
add vertical-align:bottom; css style to .box1 class.
Similarly, add same style for .box4 css class.
Thanks,

Creating a grid layout with css

I'm going to create a horizontal grid layout with CSS. (And I'll make it to scroll horizontally by JQuery and this solution. Please note that scrolling is not my problem. my problem is about creating the grid)
This is an example:
I have searched the internet about CSS Grids, but it seems that they can't help me...
My Question is, how to create something like the image above? Which plugins, or css properties should I use for this purpose?
EDIT: I want to have fixed number of rows (I mean, the number of rows should not change when I resize the page. there should be an scrollbar instead.) (I will use it inside a div with overflow: auto)
display:table, display:table-row, display:table-cell, display:inline-block
These css properties can help, just look them up on your local css information site.
The table-values let every element behave like a table, without actually using one. This may be a good solution for your problem.
The inline-block-value solves the overhang problem some floating layouts have as the blocks are displayed inline, just like imgs. There is little support for this in old browsers, of course.

HTML Centered Tiles

I'd like to design a horizontal line of tiles. Ideally I'd like something like this:
http://jsfiddle.net/GolezTrol/BDb5K/ found in another post by GolezTrol.
But centered. I have a lot of trouble centering elements, and these have been no exception. What is the best way to center (and space out) a structure like this?
EDIT: this is what I want - http://i.imgur.com/5DIOk.png
One way would be to give the #container element a fixed width and then apply this style:
margin: 0 auto;
That will work for horizontal alignment, if you're after vertical alignment as well take a look at this page which has a working example for most (if not all) browsers.
If you don't have a "religious" objection to tables, they may be your best solution.