Monday 27 June 2016

HTML Table view - > 3x2 table in div and css3 center content

HTML Table view - > 3x2 table in div and css3 center content:

--------------------------------------------------------------------------------------------


HTML:
------

 <li class="ie-browser">
            <div class="ie_icon_browser">
                <img src="images/Google_browser_icon.png" alt="chrome" />
                <span class="ie-chrome">chrome</span>
            </div>
            <div class="ie_icon_browser">
                <img src="images/Firefox_browser_icon.png" />
                <span class="ie-ff">firefox </span>
            </div>
            <div class="ie_icon_browser">
                <img src="images/Safari_browser_icon.png" alt="safari" />
                <span class="ie-safari">safari</span>
            </div>
  </li>


css:
----

.ie_icon_browser {
    float: left;
    width: 33%;
}

.ie-browser:after {
    clear: both;
    display: block;
    content: '';
}

.ie-browser {
    width: 65%;
    margin: 0px auto;
}

li.ie-browser .ie_icon_browser span {
    display: block;
}

No comments:

Post a Comment