I want to create a browser-based ebook reader, using the .xml files inside the .epub files as the content.
Now the thing is, a book has 2 pages to look at, and I experience some problems reconstructing it for various screen sizes. Especially the font.
Depending on the screen size, and dynamically in case of maximized/fullscreen/resizing the font should change accordingly to fit the two pages just right.
Below is some code I tried.
width: 50%; // so a variable width.
<div id="left">Half page of text</div>
<div id="right">Other half page of text</div>
The thing about 2
display:inline columns 50% is that with some browsers (ahem: IE) 50% isn't always 50%. So, you'll have random cases where columns don't flow correctly and your layout is jacked up. Remember, you'll also have to accommodate for margin and padding if you build a homebrew solution.
Here's an example with 960.gs for example:
<div class="container_12"> <div class="grid_6 left"> Left Column </div> <div class="grid_6 right"> Right Column </div> </div>
That's it....pretty simple. In a nutshell, you're taking a
.container-12 which would be like a row in a table that has 12 columns in it. Then you put in two divs that are
.grid-6, or half of
.container-12 each. If you wanted a one-quarter, three-quarter layout, you'd do
.grid-9 The grids automatically adapt to size as the browser resizes based on percentages with margins and padding accomodated for.
Bootstrap takes it one step further by allowing you to change your layout simply based on size. For instance, on a computer screen it could be side-by-side, while on an iPad or iPhone it could be one on top of the other. Again, you can do this with native CSS, but it's not nearly as easy.