5

I have to program a big picture mosaic on webpage, and I'm wondering what is best approach to code it, so the solution would be not very complicated to program and to maintain/change it later.

Here is a design for mosaic, each picture may change, both black and white and colour.

Mosaic

I was thinking about 3 different approaches:

  1. <table> solution,
  2. <div> and each div has its position:absolute set in CSS,
  3. <div> and placing with JS ( array with positions/ sizes ).

Any other ideas ?

kuba
  • 1,019
  • 1
  • 18
  • 39
  • 2
    Have you come across masonry? http://masonry.desandro.com/ Looks like it might help you achieve that type of layout. Also Isotope is another JS alternative http://isotope.metafizzy.co/ – Treborbob Nov 03 '14 at 10:51
  • 2
    I don't think that table is the way to go. – Rafael Eyng Nov 03 '14 at 10:55
  • Just one think to add :-) mosaic is just first step, after I do mosaic skeleton, I have to add a lot of different code around ( CMS + my custom Javascript photo editor etc. ) – kuba Nov 03 '14 at 11:44
  • 1
    Anyone else thought someone was trying to make a webpage work in the Mosiac browser? :-) – Martin Tournoij Nov 03 '14 at 14:52

1 Answers1

0

Have you seen this page here? I can imagine it would be easy to do your skeleton and your further plans with those explanations. :-)

tavaril
  • 1
  • 1
  • Welcome to stackoverflow! Great to see you're helping out, next time, try to anticipate more to the question. In this case, specify what approach of the 3 suggested in the question is taken in your case? – Mdlc Nov 03 '14 at 14:57
  • Ha! First answer and i forgot half of the stuff. Sorry! The creator of the page i linked did something with divs and javascript, so it goes in direction of suggestion three. I don't know about the plans after doing the skeleton for the mosaic, but i think this would be the best way to do it if the user who asked just want to use html, css and js. – tavaril Nov 03 '14 at 15:51