Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy won't my Div center itself in its parent?
    primarykey
    data
    text
    <p>I am making a header bar for a website. This header bar consists of 3 parts: The Back Button, The School Information, and The Login Button. The problem is that the center div, the School Information, will not center itself. I've tried everything I know how to do and nothing works.</p> <p>Here is my HTML and CSS:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>/* -- Button Bar -- */ .buttonbarframe { width: 100%; background-color: #F1F1F1; border-bottom: 1px solid #D5D5D5; box-shadow: 1px 1px 2px #D5D5D5; position: fixed; left: 0; right: 0; top: 0; /*height: 65px;*/ height: 45px; padding: 10px 0px 10px 0px; } /*#buttonbar { width: 100%; height: 45px; padding: 10px 0px 10px 0px; }*/ .buttonbarspan { height: 100%; } .buttonbarspanindex { width: inherit; height: 100%; margin: 0px; } #buttonbarschoolimage { display: block; float: left; vertical-align: middle; height: 44px; border: 1px solid #D5D5D5; } #buttonbarschoolname { display: block; padding: 0px; margin-top: 4px; text-align: left; vertical-align: middle; float: left; } .buttonbarrightbutton { display: block; float: right; } .buttonbarsycamorelogo { margin: 0 auto; display: block; text-align: center; vertical-align: middle; height: 44px; } .schoolstuff { display: inline-block; margin: 0 auto; text-align: center; vertical-align: middle; width: 341px; } .rightbutton { float: right; } .leftbutton { float: left; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class='buttonbarframe'&gt; &lt;div class='leftbutton buttonbarspan'&gt; &lt;a class='backbutton btn btn-large btn-danger' href=''&gt;&lt;i class='icon-white icon-arrow-left'&gt;&lt;/i&gt; Logout&lt;/a&gt; &lt;/div&gt; &lt;div class='schoolstuff buttonbarspan'&gt; &lt;img id='buttonbarschoolimage' src='/Schools/$EntityValue/logo'&gt; &lt;h2 id='buttonbarschoolname'&gt;Tri-County School&lt;/h2&gt; &lt;/div&gt; &lt;div class='rightbutton buttonbarspan'&gt; &lt;input type='submit' class='buttonbarrightbutton btn btn-large btn-primary' href='parentcheckin.php' value='Login'&gt; &lt;/div&gt; &lt;/div&gt;</code></pre> </div> </div> </p> <p>Here is an example of the problem.</p> <p><a href="http://www.overclock.net/image/id/6330507/width/900/height/900/flags/LL" rel="nofollow noreferrer">Image of the problem. http://www.overclock.net/image/id/6330507/width/900/height/900/flags/LL</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload