Open in TheBrain

Hellyer Bootstrap Image Abstract ARTICLES

<p>Apr 06, 2016 07:11 PM &nbsp;<b>THIS IS ESSENTIAL DESIGN INFO for my image-abstract divs</b> !!!!!</p>

<p>

This was a huge struggle for me to get right on my own. &nbsp;As usual RH shows the way

(in his original project as follows...</p>

<p>

my folder &nbsp;ARTICLES &nbsp;shows in smallest form &nbsp;(taken from <b>bobblum.combootstrapv2</b> &nbsp;...)

how &nbsp;RH = Rich Hellyer &nbsp;does his image-abstract pairs. &nbsp;There is NOTHING in his

main.css &nbsp;that helps this. It's all in the html.</p>

<p>

1) &nbsp;<b>NO &nbsp;container-fluid </b>...</p>

<p>

ONLY &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div class="container"> &nbsp;&nbsp;&nbsp;</div> &nbsp;&nbsp;at the top level in the <body></p>

<p>

2) he then immediately INSERTS a</p>

<p>

GRID &nbsp;with a single row and two columns &nbsp;</p>

<p>

&nbsp;&nbsp;&nbsp;the first column is &nbsp;where all the article &nbsp;(banners) go...</p>

<p>

<div class="row"></p>

<p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div class="col-sm-9">... (why only 9 rather than 12...

it is because &nbsp;he uses the other col-sm-3 &nbsp;&nbsp;(the rightward 3 columns for a sidebar menu

which I have eliminated.)</p>

<p>

BUT NOTE: &nbsp;I experiment with this....

KEEP that &nbsp;RIGHTWARD &nbsp;sidebar of 3 columns &nbsp;THERE even though it is BLANK!!!!

Without the 12 column main class is too BIG and the text stretches across

the entire monitor.... that is BAD!!!! &nbsp;I really WANT that 3 column right side offset...

otherise the article text is spread out over too large a width!!!</p>

<p>

and keep this at &nbsp;col-sm-9 &nbsp;for the main &nbsp;div below that includes all the article divs.</p>

<p>

(the empty &nbsp;col-sm-3 &nbsp;with no content... follows &nbsp;the entire &nbsp;main div )</p>

<p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div class ="main"> &nbsp;&nbsp;&nbsp;note: &nbsp;main &nbsp;is his class that contains &nbsp;ALL the image-abstract divs</p>

<p>

&nbsp;

and then</p>

<p>

<div class ="article"> .... &nbsp;</div> &nbsp;each of these &nbsp;may or may not&nbsp;include a headline div.

<div class ="article"> .... &nbsp;</div>

<div class ="article"> .... &nbsp;</div></p>

<p>

that headline div &nbsp;he handles as follows...</p>

<p>

<div class="row"></p>

<p>

&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<<b>div class="col-sm-8 col-sm-offset-4"</b>></p>

<p>

&nbsp;<h3> New (February 2016): <a href="ESSAYS/ORIGINALS/Future-of-Humanity.html">AI and the Future of Humanity </a> </h3></p>

<p>

&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>

</div></p>

<p>

(the effect of the col-sm-offset-4 is to &nbsp;ALIGN the headline with the abstract below it

(since the IMAGE that follows, also occupies a column of &nbsp;4 &nbsp;(in the BS 12 column system)</p>

<p>

this works &nbsp;even though the &nbsp;col-sm-offset-4 &nbsp;follows the col-sm-8 &nbsp;in class order &nbsp;here...</p>

<p>

<div class="col-sm-8 col-sm-offset-4"> &nbsp;&nbsp;...............</p>

<p>

tested by me.... yes... the order does NOT matter... the offset pushes it to the RIGHT

no matter where it is in the code.</p>

<p>

Now, &nbsp;does &nbsp;sm or md or lg &nbsp;matter... and what is the effect?

YES... it IS affected by the media queries that are invoked by &nbsp;lg versus small...

ie &nbsp;it ONLY has the correct &nbsp;4 column offset when in the LARGE screen mode...

that is NOT what is wanted. &nbsp;we want the offset to ONLY stop taking effect when

at xs &nbsp;width.</p>

<p>

the slider in DW does work to reduce the width of the offset...

ie the offset only comes into effect when ABOVE &nbsp;sm... which launches&nbsp;

the media query. &nbsp;(I see that when I set it to xs... then nothing happens, ie

the offset is ALWAYS in effect.)

So, &nbsp;&nbsp;sm &nbsp;is the correct &nbsp;value!!!</p>

<p>

Finally, &nbsp;if you do NOT want a headline... just &nbsp;get rid of that &nbsp;div...

but &nbsp;I &nbsp;DO ALWAYS want a headline... it bears the main link to the article!!!!</p>

<p>

</p>

<p>

On to the &nbsp;image-abstract &nbsp;piece of it..... &nbsp;(the guts of it!)</p>

<p>

This is very easy!!! &nbsp;He just inserts</p>

<p>

a single &nbsp;BS row with two columns...as follows...</p>

<p>

<div class="row"></p>

<p>

&nbsp; <div class="col-sm-4"></p>

<p>

&nbsp; <img class="img img-responsive" src="images/future_eye.jpg" alt=""></div></p>

<p>

&nbsp; <div class="col-sm-8"></p>

<p>

&nbsp;<p> The prospect of <strong>horrific AI taking over soon </strong> has been prominent in recent news

&nbsp;as Elon Musk and Stephen Hawking have posted warnings. Elon wasn't born yet when

&nbsp;I began studying AI and neuroscience. The above essay is my take on this. In brief ... </p>

*</p>

<p>

4 small columns for the image &nbsp;and 8 columns for the abstract... which can be of any length...</p>

<p>

the image... he does as</p>

<p>

INSERT image &nbsp;and brose to it... then qualify it with

class="img img-responsive" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to make it responsive....

no centering... no vert alignment... nothing... it's fine as it is!!! &nbsp;simple.</p>

<p>

I see something is cutting is down in size &nbsp;to be &nbsp;158px by 98 px &nbsp;high

to fit inside the 4 columns.</p>

<p>

Iinspect in google... yes the native image seems to be &nbsp;284 by 177... &nbsp;so is actually be

re-sized by &nbsp;BOOTSTRAP!!!! &nbsp;(I see that by inspecting it inside DW &nbsp;and then sliding

the right side slider to resize the Live view window.</p>

<p>

OR, &nbsp;you can inspect the image &nbsp;insdie Google Chrome dev tools as you are in responsive mode

and use the slider... it DOES dynamically resize !!!!</p>

<p>

The abstract itself... is super simple!!!!</p>

<p>

just &nbsp;lay &nbsp;the paras &nbsp;right into the &nbsp;rightside &nbsp;column which is &nbsp;the</p>

<p>

<div class="col-sm-8"> &nbsp;... &nbsp;(note: &nbsp;the image is located inside the leftmost <div class="col-sm-4">&nbsp;</p>

<p>

are those floated? &nbsp;&nbsp;NO!!! &nbsp;they cannot be... cuz BS is setting everything by default

except the &nbsp;WIDTH.... do "show set" in DW &nbsp;to see that.</p>

<p>

as an expt, I reset the columns to col-sm-3 for the image and col-sm-9 for the abstract...</p>

<p>

I see that the image is now in a 25% &nbsp;width div &nbsp;which is &nbsp;3/12s &nbsp;= 25%

and the abstract colun is now at 75%...</p>

<p>

as another &nbsp;expt, I reset the columns to col-sm-6 for the image and col-sm-6 for the abstract...</p>

<p>

I see that the image is now in a 50% &nbsp;width div &nbsp;which is &nbsp;6/12s &nbsp;= 50%

and the abstract colun is now at 50%...also...</p>

<p>

The correct setting should be exactly as RH = Richard laid it out</p>

<p>

3 columns for the image and 9 columns for the abstract...</p>

<p>

</p>

<p>

Also note: &nbsp;NO SEPARATE DIV is required for the IMAGE

you just insert it directly into the leftmost BS &nbsp;col-sm-3 ....</p>

<p>

and &nbsp;NO SEP. DIV is required for the ABSTRACT...

you just lay the para directly into the rightmost BS col-sm-9...</p>

<p>

also note: &nbsp;the image &nbsp;does not need to have &nbsp;center-block

and &nbsp;does not need any special treatment in the &nbsp;CSS...

the CSS is entirely empty !!!! &nbsp;nothing requried!!! &nbsp;EASY!!!</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>