I am trying to recreate this team/leadership page:
I have put a box shadow around my ul element, as the example above does. I can't get the margins around the li elements the same way - I set the right margins to be 5 px, but it still bordered with white. How do I get the margins (or space between li elements) to just be filled with the background color of the div (or the ul in this case)?
JSFiddle here: http://jsfiddle.net/mzechar/gyo6t25e/10/
HTML:
<section class = "content-wrapper team">
<h3>Columbia</h3>
<div class = "team-listing">
<ul>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<div class = "circle-image-crop">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
</div>
Jane Jam
<br>
<span class = "bio">lead the design and development of early tablet PC, UMPC, and mobile phone prototypes and helped with the initial design of the current iPhone app.</span>
</div>
</li>
<li>
<div class = "team-member-listing-wrapper">
<img class = "team-member-photo" src="BW.jpg" onmouseover="this.src='COLOR.jpg'" onmouseout="this.src='BW.jpg'"">
<span class = "team-member-name">Jane Jam</span>
</div>
</li>
</ul>
</div>
</section>
CSS:
section.team{
margin: auto;
overflow: hidden;
background: #FEFEFE;
display:inline-block;
}
.team-listing{
position:relative;
margin-top:40px;
margin-right:auto;
margin-left:auto;
}
.team-listing li{
display:inline-block;
width: 30%;
overflow: hidden;
float:left;
height: 320px;
list-style-position:inside;
margin-right:5px;
background-color:#FEFEFE;
}
.bio{
display: inline-block;
text-align:left;
color: #111;
font-size: 1rem;
line-height: 1;
visibility:hidden;
}
.team-member-listing-wrapper{
text-align: center;
vertical-align: top;
width:100%;
height:100%;
margin: 0 auto;
display:inline-block;
}
.team-member-listing-wrapper strong{
font-size: 1.125rem;
line-height: 1;
}
.team-listing ul{
display:table;
list-style: none;
box-shadow:0 0.9375rem 3.75rem rgba(2,2,22,0.1);
white-space: nowrap;
width:80%;
margin:auto;
}
.circle-image-crop{
width: 180px;
height: 180px;
position: relative;
overflow: hidden;
border-radius: 50%;
margin-left:auto;
margin-right:auto;
margin-top:20px;
}
.circle-image-crop:hover{
height:100%;
width:auto;
border-radius:0%;
}
.circle-image-crop img{
display: inline;
margin: 0 auto;
height: 100%;
width: auto;
}
You would have to use filter: drop-shadow(5px 5px 5px #222); in this case as the shadow for the <ul>.
Box-shadow is only around the div, and doesn't fill the inside of it.
Box-shadow vs Drop shadow
Related
I am attempting to create a 2 column layout using bootstrap where in each row there are 2 columns :
One contains Text and one contains images adding to the explanation of the text
This is the bootstrap code :
This is the navigation bar.
<div class = "navbar navbar-default navbar-static-top">
<div class = "container ">
levi
<button class = "navbar-toggle" data-toggle = "collapse" data-target = ".navbar-collapse"
name = "button" >
<span class = "navbar-toggle-Menu">Menu</span>
</button>
<div class = "collapse navbar-collapse ">
<ul class = "nav navbar-nav navbar-right ">
<li> product</li>
<li> price</li>
<li>Support</li>
<li>Sign In</li>
</ul>
</div>
</div>
</div>
This is the 2 column layout for each row
<div class = "container">
<div class = "row">
<div class = "col-sm-6 col-md-6 col-lg-8">
<h3><b>Connect Soft documents</b></h3>
<p class = "lead">Allow documents that feed into each other to provide a consistent, untainted view of the
financial, operational and social behaviour of the institution.</p>
</div>
<div class = "col-sm-3">
Image
</div>
</div>
<div class = "row">
<!-- position image to the right when on desktop,, but allow image to occupy the whole webpage when the device is less the 768px-->
<div class = "col-sm-5">
<h3><b>Improve decision models</b></h3>
<p class = "lead">Use statistical modelling to identify patterns and anomalies in the data that can help in
making better decisions.</p>
</div>
<div class = "col-sm-6">
<img src = "Statistics.png" alt = "Statistics" width = "350px" height = "270px" class = "pull-right img-responsive imG">
</div>
</div>
<div class = "row">
<div class = "col-sm-6">
<h3><b>Search. Get what is important to You!</b></h3>
<p class = "lead">All notifications and documents are indexed and
archived so that you can find what is needed at all times.</p>
</div>
<div class = "col-sm-6">
</div>
</div>
<div class = "row">
<div class = "col-sm-4">
<h3>Collaborate with other apps!</h3>
<p class = "lead" >Connect to the tools you need to prevent wasting time using so many apps </p>
<div class = "col-sm-8">
<img src = "Integrate.jpg" alt = "Integrate" width = "300" height = "300" >
</div>
</div>
</div>
<footer>
<div class = "">
<ul>
<li>Security</li>
</ul>
</div>
</footer>
How I want it to work is that when the page is being viewed on a desktop the text is aligned left and the image is aligned right.
When it is being viewed on a screen on less than 768px, the text is above the image and the image is aligned in the center of the page.
e.g.
Desktop : Text | Image
Mobile :
Text
Image
Here is my jsfiddle bootstrap website
It should have the same responsive design as slacks product page
slack's product page
it is very much easy just apply this css in the responsive media to the images
.imG{
float: none !important;
margin: auto;
text-align: center;
}
here is the updated js Fiddle
Here the solution :
<div class="row">
<div class="col-md-6 col-sm-12">
<h3>Collaborate with other apps!</h3>
<p class="lead">Connect to the tools you need to prevent wasting time using so many apps </p>
</div>
<div class="col-md-6 col-sm-12 text-center-sm">
<img src="Integrate.jpg" alt="Integrate" width="300" height="300">
</div>
</div>
I also add conditional text-align class in the css
.text-center-xs {
text-align: center;
}
/* Small devices (tablets, 768px and up) */
#media (min-width: 768px) {
.text-center-sm {
text-align: center;
}
}
/* Medium devices (desktops, 992px and up) */
#media (min-width: 992px) {
.text-center-md {
text-align: center;
}
}
/* Large devices (large desktops, 1200px and up) */
#media (min-width: 1200px) {
.text-justify-lg {
text-align: center;
}
}
The complete jsfiddle here
Take care of your tabulation in your html it's very important to provide a clean code.
Cheers bro
I have an HTML page and I am trying to fix the print layout issues on all of the browsers. Here is the code
<style type="text/css">
#media print {
* {
overflow: visible !important;
}
body {
height: auto;
color: #000;
background: #fff!important;
}
nav, aside {
display: none;
}
a-page {
float: left;
margin: 0;
box-shadow: 0;
page-break-inside: avoid;
widows: 3;
orphans: 3;
}
#header, #menu, #sidebar{ height:1px; display:none;}
#page {
size: A4 portrait;
}
ul.grid-container {
margin: 0;
padding: 0;
}
}
body {
background: rgb(204,204,204);
}
a-page {
width: 21cm;
height: 29.7cm;
background: white;
display: block;
margin: 1cm auto;
}
ul.grid-container {
border:0px dashed black;
width:100%;
vertical-align: middle;
text-align: center;
table-layout: fixed;
list-style-type: none;
padding-left: 0;
margin-top: 0
}
ul.grid-container .container {
border: 1px dashed black;
width: 49.7%;
height: 100%;
float: left;
position: relative
}
p.fcards {
padding-left:10px;
padding-right:10px;
text-align:center;
}
p.fc_sm {
padding-left:10px;
padding-right:10px;
text-align:center;
font-size: 1em;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
}
p.fc_md {
padding-left:10px;
padding-right:10px;
text-align:center;
font-size: 1.5em;
}
p.fc_lg {
padding-left:10px;
padding-right:10px;
text-align:center;
font-size: 2em;
}
.size_4x2 .grid-container li{
height:7.4cm;
}
</style>
<body class="size_4x2">
<a-page>
<ul class="grid-container">
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
</ul>
</a-page>
<a-page>
<ul class="grid-container">
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
</ul>
</a-page>
<a-page>
<ul class="grid-container">
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
<li>
<div class="container"><p class="fc_sm"><span>test</span></p></div>
<div class="container"><p class="fc_sm"><span>test</span></p></div> </li>
</ul>
</a-page>
</body>
https://jsfiddle.net/lajin/myf8nfpk/
When I see print layout
On Chrome it add an extra page before each page
On FF the page loads fine but margins on top is different on first pages
IE there is Huge bottom margin as it shrinks to fit the screen
Any suggestions on how to fix the print page issues?
Thank you for you help in advance.
Most of your problems have been caused by inefficient usage of margins, padding and borders. I solved this problem by first stripping away the irrelevant code by removing class definitions that were never called upon and removing lines that I knew or suspected were not influential, test running the new code after each removal to ensure no difference was made to the performance of the page.
My next step was to add the following CSS code to the beginning of the CSS component...
*
{
box-sizing : border-box;
margin : 0;
padding : 0;
}
By default borders are not included in the defined dimensions of an area and are instead added to the outside of the area. By using box-sizing : border-box; at the highest level you force each area's borders to be included within it's area.
The default behaviour of margins and padding can also be a cause of much hidden grief. By setting them to 0 at the highest level you can then afford to ignore them until such time as you know they are going to be needed for a specific class or id definition, at which point you would define them as per normal.
Next, I changed the line -
margin: 1cm auto;
to -
margin : auto;
As your file is currently coded this has the effect of making it appear as if large amounts of padding surround the A4 sheet which can look fine on-screen, but it is still included in the printed area which can cause poor layout when printing. There are a few ways of getting around this problem. I would suggest regarding a-page as the A4 area and adding within that div a second div such as a-page-text-area wherein would be placed the actual text. For now I am using margin : auto; to keep the page centred horizontally and using buffer regions to separate the pages vertically.
Finally, with the class definitions ul.grid-container .container and ul.grid-container you are relying on one definition to overwrite the properties of another. In more complex programs this can lead to errors occuring in some circumstances. As a matter of good practice I recommend placing all shared property definitions within a common class or classes and all peculiar property definitions in an id. Please note that when opening a div code such as class = "container-grid container-all" can be used to apply the attributes of more than one class to that div.
The complete code that I used to fix your problem follows...
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<meta name = "viewport"
content = "width=device-width, initial-scale=1.0"
>
<style type = "text/css">
*
{
box-sizing : border-box;
margin : 0;
padding : 0;
}
#media print
{
#page
{
size : A4 portrait;
}
.a-page
{
float : left;
page-break-inside : avoid;
}
body
{
background : #fff!important;
}
}
body
{
background : rgb( 204, 204, 204 );
}
.a-page
{
background : white;
display : block;
height : 29.7cm;
margin : auto;
width : 21cm;
}
.buffer-region
{
min-height : 20px;
}
.container
{
border : 1px dashed black;
width : 50%;
}
.fc_sm
{
font-size : 1em;
left : 50%;
margin : 0;
position : absolute;
top : 50%;
transform : translate(-50%, -50%);
}
.grid-container
{
list-style-type : none;
width : 100%;
}
.grid-container .container
{
float : left;
height : 100%;
position : relative;
}
.size_4x2 li
{
height : 7.4cm;
}
</style>
</head>
<body class = "size_4x2">
<div class = "a-page">
<ul class = "grid-container">
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
</ul>
</div>
<div class = "buffer-region">
</div>
<div class = "a-page">
<ul class = "grid-container">
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
</ul>
</div>
<div class = "buffer-region">
</div>
<div class = "a-page">
<ul class = "grid-container">
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
<li>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
<div class = "container">
<p class = "fc_sm"><span>test</span></p>
</div>
</li>
</ul>
</div>
</body>
</html>
If you have any questions or comments, then please feel free to ask / make them.
I have a CSS hover problem - hover isnt working. Can you please check out the code ant tell me whats wrong?
<div class = "prof_line1">
<div class = "prof_image" id = "kristaps_pic">
<img src = "http://pokkers.lv/slakters/hhimages/krissprof.jpg"></img>
<p>Kristaps Slakters - Zvejsalnieks, Frizieris/stilists/kreatīvais direktors</p>
</div>
<div class = "prof_image" id = "alise_pic">
<img src = "http://pokkers.lv/slakters/hhimages/alise.jpg"></img>
<p>Alise Zvejsalniece Slaktere, House of Hair menedžeris</p>
</div>
</div>
<div class = "prof_info" id = "kristaps_info">
<p>Kristaps Slakters Zvejsalnieks Pasaules līmenī godalgots frizieris/ stilists/dizaineris kuram savu imidžu uztic Latvijas, Krievijas un Īrijas slavenības un mākslinieki. Daudz ceļojis un vācis pieredzi dažādās valstīs.</p>
<p><b>Studējis:</b> Rīgas Stila un Modes profesionālajā vidusskolā Baltijas Krievu Institūtā – vides dizainu. Colomer Akadēmijā Dubinā ieguvis Color Specialist Degree, 6 mēnešus pavadījis apmācībā „Tony and Guy” Akadēmijā, 2007- 2009 apguvis Barber profesiju „Hackett's Barber Academy”, 2011 ieguvis „American Crew” Creative Barber diplomu.</p>
<p><b>Apbalvojumi un godalgas:</b></p>
<p> hudge text box
</div>
Here is style and really dont understand why this is not working
.prof_info {
font-size:15px;
border:3px solid black;
width:914px;
margin-top:30px;
margin-left:50%;
transform:translate(-50%);
-webkit-transform:translate(-50%);
display:none;
z-index:1;
}
#kristaps_pic p:hover+#kristaps_info {
display:block;
}
The thing is... the + selector, selects the very below element after the p element. That´s why it´s not working. If you try something like this will work for sure:
#kristaps_pic:hover + #kristaps_info {
display:block;
}
Or if you want to hook the #kristaps_info just if hovering the p you have to alter a bit your markup to the following:
<div class = "prof_line1">
<div class = "prof_image" id = "kristaps_pic">
<img src = "http://pokkers.lv/slakters/hhimages/krissprof.jpg"></img>
<p>Kristaps Slakters - Zvejsalnieks, Frizieris/stilists/kreatīvais direktors</p>
<div class = "prof_image" id = "alise_pic">
<img src = "http://pokkers.lv/slakters/hhimages/alise.jpg"></img>
<p>Alise Zvejsalniece Slaktere, House of Hair menedžeris</p>
</div>
</div>
</div>
CSS worked otherwise.
.prof_info {
font-size: 15px;
border: 3px solid black;
width: 914px;
margin-top: 30px;
margin-left: 50%;
transform: translate(-50%);
-webkit-transform: translate(-50%);
display: none;
z-index: 1;
}
#kristaps_info {
display: none;
}
#kristaps_pic p:hover+#kristaps_info {
display: block;
}
<div class="prof_line1">
<div class="prof_image" id="kristaps_pic">
<img src="http://pokkers.lv/slakters/hhimages/krissprof.jpg">
<p>Kristaps Slakters - Zvejsalnieks, Frizieris/stilists/kreatīvais direktors</p>
<div class="prof_info" id="kristaps_info">
<p>Kristaps Slakters Zvejsalnieks Pasaules līmenī godalgots frizieris/ stilists/dizaineris kuram savu imidžu uztic Latvijas, Krievijas un Īrijas slavenības un mākslinieki. Daudz ceļojis un vācis pieredzi dažādās valstīs.</p>
<p><b>Studējis:</b> Rīgas Stila un Modes profesionālajā vidusskolā Baltijas Krievu Institūtā – vides dizainu. Colomer Akadēmijā Dubinā ieguvis Color Specialist Degree, 6 mēnešus pavadījis apmācībā „Tony and Guy” Akadēmijā, 2007- 2009 apguvis Barber
profesiju „Hackett's Barber Academy”, 2011 ieguvis „American Crew” Creative Barber diplomu.</p>
<p><b>Apbalvojumi un godalgas:</b></p>
<p> hudge text box
</div>
</div>
<div class="prof_image" id="alise_pic">
<img src="http://pokkers.lv/slakters/hhimages/alise.jpg">
<p>Alise Zvejsalniece Slaktere, House of Hair menedžeris</p>
</div>
</div>
The table looks good on the desktop, but the #media screen of 480x800 makes it go offscreen. Is there a way to line break the contents of table rows in CSS, such that the contents appear on each line instead?
This is how it looks like as of now, i wanted the old man image to proceed to the next line, rather than going offscreen.
This is the html
<div class="sub" id = "history">
<h1>SCIS Roots</h1>
<table class = "table">
<tr>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/bless.jpg" alt = "historyImage1">
<div class = "description">
<p class = "description_content">
The youngest School in Saint Louis University started with the
vision of the then Vice-President for Finance and later University
President, Rev. Fr. Ghisleen de Vos(1976-1983).
</p>
</div>
</div>
</td>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/hist2.png" alt = "historyImage2">
<div class = "description">
<p class = "description_content"> Fr. de Vos saw the
possibility of automating accounting and enrolment systems during
a period where computerization was not yet widely practiced.
</p>
</div>
</div>
</td>
</tr>
</table>
<h3>SCIS- LEVEL UP!</h3>
<table class = "table">
<tr>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/hist7.png" alt = "historyImage3">
<div class = "description">
<p class = "description_content">
SLU catered to the computing needs of other institutions in nearby
regions when it was acquitted by IBM Systems in 1969 and 1980 until
1990.
</p>
</div>
</div>
</td>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/scis.jpg" alt ="historyImage4">
<div class ="description">
<p class = "description_content">
In 1990 it became the Institute of Information and
Computing Science and offered the Computer Science course. The
institute became a college in 1994.
</p>
</div>
</div>
</td>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/hist3.png" alt = "historyImage3">
<div class = "description">
<p>
Courses in Information Technology, Mathematics, Information Management, and Library and
Information Science were added over time. By 1995, it was the first
in the region to offer a graduate program in IT.
</p>
</div>
</div>
</td>
</tr>
</table>
<h3>SCIS REACHES OUT!</h3>
<table class = "table">
<tr>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/ict.jpg" alt = "historyImage4">
<div class = "description">
<p>
In 2007, it hosted the first ever Northern Luzon International IT
conference. This was attended by people from all over the globe and
became an annual event.
</p>
</div>
</div>
</td>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/hist4.jpg" alt = "historyImage4">
<div class = "description">
<p class = "description_content">
To keep up with the trend of Digital Arts technology, the School
has since added short diploma courses in digital animation,
multimedia systems, digital design, editing and publishing, and
the like. The School is also the first in the country to offer the
trending academic initiative - Masters of Science in Service
Management Engineering(MSSME).
</p>
</div>
</div>
</td>
<td>
<div class = "wrapper">
<img class = "tableImage" src = "../images/hist5.png" alt = "historyImage6">
<div class = "description">
<p class = "description_content">
The School is also socially relevant when it comes
to sharing its expertise and resources. In 2007, it donated
multiple computers to the Baguio City National High School(BCNHS)
as part of a collaborative project with the Close the Gap(CTG)
alliance program of Belgium. Along with this, the School designed
and conducted a series of training programs for the teachers of
the BCNHS on several computer and web-based applications.
</p>
</div>
</div>
</td>
</tr>
</table>
<h3>THE FUTURE OF SCIS!</h3>
<p id = "future">
The School's future looks bright as it continues to soar with the
speed of rapid modernization. The School of Computing and
Information and Sciences recognizes though that the power to
create, command, and control information technology comes with
great responsibility. The School therefore primes itself not
only on setting new academic directions towards the advancement
of IT and Computing education and research, but also on
advocating the ethical use of information and computing
technology.
</p>
</div>
This is the css that relates to the table
.wrapper{
float:left;
position:relative;
margin; 0 auto;
}
.description{
position:absolute;
bottom:0px;
left:0px;
width:100%;
background-color:black;
font-family: 'tahoma';
font-size:15px;
color:white;
display:none;
border-radius:3em;
}
a:hover+div{
display: block;
opacity:0.6;
}
.description_content{
padding:10px;
margin:0px;
display:block;
}
.table{
margin-left:auto;
margin-right:auto;
padding: 2px;
}
.tableImage{
width : 304px;
height: 228px;
display: inline;
border:2px solid;
border-radius:2em;
margin:5px;
}
.tableImage:hover{
width : 350px;
height: 300px;
box-shadow:10px 10px 5px #888888;
}
If you want your page to be responsive, I'd move away from placing content in a table. With regards to the images on your page, I'd place each one in a div. The divs would be placed side-by-side by default, with a media query placing them one of top of another for narrow displays.
HTML
<div class="parent">
<div class="img-container">
<img src="..."></img>
</div>
<div class="img-container">
<img src="..."></img>
</div>
</div>
CSS
.img-container {
display: inline-block;
}
#media all and (max-width: 480px) {
.img-container {
display: block;
}
}
I'm using twitter bootstrap and also it's responsive design. When I shrink my browser (Chrome) or view the below code in my iPhone browser, the text all appears on one line. However, when I increase the font size to 20px, the text wraps underneath the image. What can I do in order to have the the text (when it is 2 lines long) appear to the right of the icon/image instead of wrapping beneath it?
<div class = 'row'>
<img src = "http://a286.phobos.apple.com/us/r1000/113/Purple2/v4/a2/b1/40/a2b14050-c4be-4243-2cad-7dc1fcaec726/mzl.vkophohs.png" style = "width:60px;">
<span style = "font-size:18px;">The Hobbit: Kingdoms of Middle-earth<br /></span>
</div>
I would do the same as Nik but a bit differently:
http://jsfiddle.net/gkxz4/
<div class = 'row'>
<div class="col_image">
<img src = "http://a286.phobos.apple.com/us/r1000/113/Purple2/v4/a2/b1/40/a2b14050-c4be-4243-2cad-7dc1fcaec726/mzl.vkophohs.png" style = "width:60px;">
</div>
<div class="col_text">The Hobbit: Kingdoms of Middle-earth</div>
</div>
.row { width:400px; overflow:hidden; }
.col_image { float:left; width:60px; margin:0 20px 0 0; }
.col_text {float:left; width:320px; font-size:18px;}
<div class = 'row'>
<img src = "http://a286.phobos.apple.com/us/r1000/113/Purple2/v4/a2/b1/40/a2b14050-c4be-4243-2cad-7dc1fcaec726/mzl.vkophohs.png" style = "width:60px; float:left; padding-bottom:30px;">
<span style = "font-size:20px; vertical-align:middle; line-height: 30px; ">The Hobbit: Kingdoms of Middle-earth<br /></span>
</div>
<div class="row">
<img src="http://a286.phobos.apple.com/us/r1000/113/Purple2/v4/a2/b1/40/a2b14050-c4be-4243-2cad-7dc1fcaec726/mzl.vkophohs.png" style="width:60px;float:left;">
<div style="float:left;">The Hobbit: Kingdoms of Middle-earth<br/></div>
</div>