Posts Tagged with center

Displaying 1-3 of 3 results.
Wiki: Bootstrap text-align classeswiki
posted by admin on October 12, 2016

<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>
Read more
Resolved: How to align 3 divs (left/center/right) inside another div?
posted by admin on July 18, 2016

[[LEFT] [CENTER] [RIGHT]]

Container div is 100% wide (no set width), and center div should remain in center after resizing the container.

So I set:

#container{width:100%;}
#left{float:left;width:100px;}
#right{float:right;width:100px;}
#center{margin:0 auto;width:100px;}
Read more
Resolved: How do I horizontally center an absolute positioned element inside a 100% width div?
posted by admin on January 1, 2016
In the example below, #logo is positioned absolutely and I need it to be horizontally centered within #header. Normally, I would do a margin:0 auto for relatively positioned elements but I am stuck here. Can someone show me the way?

HTML

<div id="header">
<div id="logo"></div>
</div>


CSS

#header {
background:black;
height:50px;
width:100%;
}

#logo {
background:red;
height:50px;
position:absolute;
width:50px
}
Read more