I've tried angular2-masonry, but unfortunately I get most of the problems what won't be solved ever because the project is dead...
I need something which is able to automatically put order my elements like this:
As you may see I only have 2 columns (and yes, when I took the picture the masonry worked, but unfortunately it doesn't work correctly at page load, and I can't build prod with it...) and I need to stack the elements together without any gap between them.
I only need to get something with the functionality of Masonry because my Width is fixed, only the element's high can change.
Thanks for the answers!
Related
I am new to web development, especially Jquery and Bootstrap.
I am trying to include Jquery Isotope to achieve a Pinterest like layout in one of the pages of my yet to be launched dream website, but I have run into few problems here. Since my html code is too long and I am in kind of in a hurry, I have made these .gif images that explain the problem better than my explanation below:
The html elements I want to apply Isotope to come in a loop and seem to load properly upto only a few iterations. After that I can see a lot of gaps between the elements. If I try to resize the browser window, they rearrange themselves and everything is fine again [Please see image 1 to get a clear picture]. Note: This problem seems to exist only with the divs having Images. The text only elements are perfectly arranged.
I want to the elements to re-arrange themselves if I remove any of them, which doesn't seem to work.
Also, the elements are of variable heights and can be expanded in few conditions. I want the elements to rearrange themselves even in this case. [Please see image 2 to get a clear picture].
JS
if ($('#container').length) {
$('#container').isotope({
itemSelector: '.container-item',
layoutMode: 'masonry'
});
}
Please help me solve these problems. Thanks in advance.
It's hard to tell from the code and samples provided, but I think these are from default CSS margins or padding from masonry. When you open this in your browser, use your inspect element tool to see what classes are causing those gaps, then override that CSS. Wish I could be more help, but this is the best I can do with what is provided.
What you are trying to achieve and what i have understood.Please have a look here
http://cssdeck.com/labs/css-only-pinterest-style-columns-layout
Complex Grid Layout, Help!
I'm making a responsive website using bootstrap 3.0.2 and can't figure out the layout that is stated in the requirements document for the project. I made an image of what I need, and will give more detail, or update my question, if needed. I am open to any suggestion on how to accomplish this.
The Issue
This image describes what I need the design to look like at three different widths.
I should add, each box will be basically a div with an image, article title and summary within it.
Like to say ... in advanced
Id like to say thanks and apologize in advanced if the question is dumb or the answer is obvious. I have been a dev for a long time, but I'm new to responsive design and I've been banging my head on the wall trying to get this to work
The problematic part of your project is to make two smaller blocks side with a bigger one and make these two 50%. As far as I know, there are no mature cross-browser solutions that would accomplish that without javascript.
You may want to take a look at: Flexbox and for Comrade IE Flexie.
Another approach to accomplish the same could be using viewport dimensions. Just be aware of the browsers support.
All in all, if you can do that, I would suggest just using JS, with a fallback to css that will not break the site's look too much. Having just finished a project with similar requirements, I would just like to say good luck.
I'm trying to get my head around working with responsive webdesign (by column stacking) and I'm currently using this grid for my layouts: http://www.responsivegridsystem.com/ which I think works quite neat.
Only thing I'm running my head the wall with is to make it "smart enough" to also try and fit my columns by their height. What I have so far is this: http://gridtest.uconsult.dk/ and what I'm looking for is this: http://gridtest.uconsult.dk/gridheight.png so that the grid is trying to fit the rows by their height aswell as the column count.
Is this possible in some way? :-) Should I by using some other grid for this or do I have to make up some hacky javascript to achieve what I want?
Thanks in advance.
Don't reinvent the wheel! David DeSandro already put out a couple jquery plugins that will do this for you. Masonry was the first one and works very well, and Isotope is the newer version that expanded on the original thinking along with additional features like sorting. Both will do a good job of creating the dynamic grid system you're hoping for.
I recently just added a grid layout, but I can't figure out how to make my links work. The grid that I used is the 1140 one at http://cssgrid.net/. I studied the source code of that website, and tried to make my page like theirs, but when I put everything in it made mine worse, and the grid didn't even work. This is how my website is supposed to look http://spencedesign.netau.net/singaporehome.html
and this is how it does
http://spencedesign.netau.net/home.html
And when you reduce the size, it doesn't look like it's supposed to. When you minimize it I want the pictures(links) to be two per row, then one per row depending on how small the page is. I also want the quote to turn into different rows when it is too small for it. But I can't figure out how to make the page look normal regularly let alone make it look good with a smaller browser. Thanks!
http://goldengridsystem.com/ might have what you're looking for. Folding effect worked for me.
I have got a requirement where the outlook is as shown in the attached image
I have accomplished the task by making use of tables in HTML and styling using CSS.
The criteria is that the images in a row is almost the same (i.e the two images) and the content changes for every row. So the content is different on every row but the images remain the same for every row. Just for info there will be multiple number of rows. What would be the best practice to implement such as design other than using tables, where it should also be flexible to change the content. Or using tables is the best option.
Suggestions from the professionals are appreciated.
I don't want to write it for you but I've made a quick mock up for you to have a look at - http://jsfiddle.net/spacebeers/TAJdw/
You don't want to use tables for anything other than tabular date anymore. You're much better off spending your time researching CSS.
Have a look at my example. It's what one instance of a content container could look like. What you want to do from there is look at getting two of them in a row. Build the CSS for the .container class, then copy another instance of .contentContainer in and see what results you get.
I'm happy to provide help if you want but it's always good to have a crack at it yourself. You'll get better answers on here and avoid unnecessary downvoting of your question.
It is generally advisable to use pure css for things like this, rather than tables. Tables cause your page to render slower, as the content needs to be loaded before the rendering engine can correctly draw them.
Try something like this
I would consider using a div with a background image style to it so that for each row with the same image all you will need to do is put that specific div class in. Then you can just position the outer div's to get it to look correctly, although tables are not the most efficient way of build web pages they still work.
Like mez said - you need to think about repeating content - and learning about floats. I'd really advise working through this site
http://css.maxdesign.com.au/floatutorial/
it will teach you all the basics of designing with divs.
In the meantime - here's roughly what your're after. I've added background colours and made up all the heights and widths, as they weren't specifie, but it should get you started.
If you look at the html, I've annotated what is just a repeat of earlier content.
http://jsfiddle.net/zandergrin/k8EsP/3/