javascript - Padding between articles in css and jquery -


as of right code generating random number of new articles in div within body. trying make each article tile of different color able do. issue having padding. new web development , trying make vertical , horizontal spacing 15px. here have right , not giving me correct result

also, have used "padding" , going border of articles rather each individual one.

is looking for? fiddle

by "article", mean long text lots of paragraphs/titles/subtitle?

js

var randomcolor = ['#73eff1','#d6c8f7','#f2c4df', '#c4f2cd', '#f2eec4', '#c4f2ef']; $('div').each(function(){     var random = math.floor( math.random() * ( (randomcolor.length - 0) + 1) ) + 0;     var newcolor = randomcolor[random];     $(this).css('background-color', newcolor);   }); 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -