Thanks to SeanKendle over at Why is my dynamic HTML seemingly randomly placed?, I've made progress on the appearance of my site, but as you can see:
...it still needs some work, specifically that the first row needs to start below the tabs. How can I accomplish that? It doesn't seem like adding padding to the tab widget would help, as it is already being encroached on by the dynamically generated html, so I'm at a loss as to how to "push down" that first row.
The fundamental html, css, and jQuery can be seen here: http://jsfiddle.net/clayshannon/cMYEH/6/
...and the html generating code is like this:
$.getJSON('Content/NBCCJr.json', function (data) {
// I tried renaming the above to nbcc.json, but it won't work with that name...?!? $.getJSON('Content/nbcc.json', function (data) {
$.each(data, function (i, dataPoint) {
if (IsYear(dataPoint.category)) {
htmlBuilder += '<div class=\"yearBanner\">' + dataPoint.category + '</div>';
} else { // see snippet at top of unit for dealing with landscape-oriented books (such as some children's books) to change height and width of img
htmlBuilder += '<section class=\"wrapper\" ><a id=\"mainImage\" class=\"floatLeft\" href=\"' +
dataPoint.imghref + '\"' + ' target=\"_blank\"><img height=\"160\" width=\"107\" src=\"' +
dataPoint.imgsrc + '\"' +
dataPoint.imgalt + '></img></a>' +
'<div id=\"prizeCategory\" class=\"category\">' +
dataPoint.category +
'</div><br/><cite id=\"prizeTitle\" >' +
dataPoint.title +
'</cite><br/><div id=\"prizeArtist\" class=\"author\">' +
dataPoint.author +
'</div><br/>';
if (dataPoint.kindle.trim().length > 2) {
htmlBuilder += '<button><a href=\"' + Urlize(dataPoint.kindle) + '\"' +
' target=\"_blank\">Kindle</a></button>';
}
if (dataPoint.hardbound.trim().length > 2) {
htmlBuilder += '<button><a href=\"' + Urlize(dataPoint.hardbound) + '\"' +
' target=\"_blank\">Hardbound</a></button>';
}
if (dataPoint.paperback.trim().length > 2) {
htmlBuilder += '<button><a href=\"' + Urlize(dataPoint.paperback) + '\"' +
//'class=\"float-right\" target=\"_blank\">Paperback</a></button>';
' target=\"_blank\">Paperback</a></button>';
}
htmlBuilder += '</section>';
}
}); //each
$('#BooksContent').append(htmlBuilder);
I added this to section.wrapper in the CSS:
padding-top:25px;
...but I still have, as you can see, that encroachment upwards of the first row of dynamic html. Do I need to add something to the CSS regarding the tab widget, or alter the generation of html, or...???