I created a box here.
but the space is too much on the top and the bottom.
See image here:
How can I remove the extra spacing between top and bottom of the:
1.Title and the date
2. The button and the text
3. The button and the extra spacing below
Here's my HTML:
<div class="col-1-3"><img src="http://www.iliveaccountable.com/wp-content/uploads/2016/11/iliveaccountable.jpg" alt="" />
<h3 style="font-family: 'Montserrat'; text-align: center;">TAKING IT TO THE SOURCE</h3>
<h4 style="font-family: 'Montserrat'; text-align: center;">11/13/2016</h4>
<a href="http://www.iliveaccountable.com/oldsite/iliveconnected-patterns/" target="_blank">
<button class="btn btn-block btn-primary">Watch Video</button>
</a>
</div>
Here's my CSS:
h4 {
text-align: center;
}
.col-1-3 {
padding: 10px;
width: 28%;
float: left;
margin: 1%;
border: 1px solid #dedede;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
}
.col-1-3 img {
width: 100%;
}
.btn-block{
display: block;
width: 100%;
}
#media only screen and (max-width: 767px) {
.col-1-3 {width: 44%;}
}
#media only screen and (max-width: 590px) {
.col-1-3 {width: 94%;}
}
I just want to have enough space but this spacing are too much.
Make margin and padding 0 for all elements within div.col-1-3
check this snippets
h4 {
text-align: center;
}
.col-1-3 * {
padding: 0;
margin: 0;
}
.col-1-3 {
width: 28%;
float: left;
margin: 1%;
border: 1px solid #dedede;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
}
.col-1-3 img {
width: 100%;
}
a {
margin: 0;
}
h3 {
margin: 0;
}
h4 {
margin: 0;
}
.btn-block {
display: block;
width: 100%;
}
#media only screen and (max-width: 767px) {
.col-1-3 {
width: 44%;
}
}
#media only screen and (max-width: 590px) {
.col-1-3 {
width: 94%;
}
}
<div class="col-1-3">
<img src="http://www.iliveaccountable.com/wp-content/uploads/2016/11/iliveaccountable.jpg" alt="">
<h3 style="font-family: 'Montserrat'; text-align: center;">TAKING IT TO THE SOURCE</h3>
<h4 style="font-family: 'Montserrat'; text-align: center;">11/13/2016</h4>
<p>
<a href="http://www.iliveaccountable.com/oldsite/iliveconnected-patterns/" target="_blank">
<button class="btn btn-block btn-primary">Watch Video</button>
</a>
</p>
</div>
Hope it helps
Create additional CSS rules for h3, h4 and btn-block in which you define settings for margin-top and margin-bottom. Start with value 0 for all and increase the values until you are satisfied with the result.
ADDITION after comments:
1.) you have an empty p tag between the image and the h3
2.) You have a CSS rule for all p tags with a bottom margin of 20px (on line 278 of "style.css")
Related
I took over a mobile app with AngularJS and Ionic 1.x (yes, old - I know). Inside this <ion-content> I would like to have the part of the email always being 10px away from the right border; independent of the media size. See screenshot in case please.
Here is the relevant part of my .html-file:
<ion-content scroll="true" class="pdfsmtp">
<h5 class="left">1. Email-Adresse:</h5>
<div class="middle">
<button ng-click="changeEmail(0)" ng-controller="EmailsCtrl"
class="button button-small button-block button-outline">{{emails[0]}}</button>
</div>
<br>
<h5 class="left">2. Email-Adresse:</h5>
(...)
</ion-content>
Here is how the .css-file looks like:
.pdfsmtp
{
.button-bar
{
width: 80%;
margin: auto;
}
.left
{
margin-left: 20px;
margin-right: 20px;
display: inline-block;
color: white;
}
.middle
{
text-align: center;
width: 200px;
display: inline-block;
}
.button-icon
{
margin-left: 20px;
color: white;
}
}
#media (min-width: 736px) and (max-width: 1023px)
{
.players.modal
{
top: 12%;
bottom: 12%;
}
}
My question is: How to have my goal achieved? I tried several approaches, but none worked so far...
Are you looking something like this?
button{
width: max-content;
line-height: 1.5;
padding: 0 10px;
font-size: 32px;
border-radius: 16px;
text-align: left;
}
<button>abcz#xyz.com</button>
<br/><br/>
<button>lonnnggg_email#xyz.com</button>
<br/><br/>
<button>mediumemail#h.com</button>
I tried to use a couple of posts that were here for resizing for mobile devices but i can't seem to get it working. The margins keep pushing all the elements together when you view the site on a mobile device
/* TEXT FORMATTING */
.introPar1 {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
margin-left: 400px;
margin-right: 400px;
font-size: 30px;
}
.introPar1 h1 {
text-align: center;
}
.contacts {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
margin-left: 400px;
margin-right: 400px;
font-size: 30px;
}
/* MOBILE FORMATTING */
#media (max-width: 1100px) {
introPar1 {
margin-right: 20px;
`enter code here`margin-left: 20px;
}
}
#media (max-width: 750px) {
body {
margin-right: 5vw;
margin-left: 5vw;
}
}
#media (max-width: 500px) {
body {
margin-right: 2vw;
margin-left: 2vw;
}
}
You are seeing this page on mobile devices like this
You need to change like this
then increase the nav bar width
(I tried width: 1520px; for Nav beacuse that is the background image size you were used)
There are a bunch of problems with your code. But the problem with the menu is because li is not taking the height of a. So the list items will stack one under another, and will li under li. Li being smaller than a.
Use display:block on a.
Also, I copied the code from your site, so it will be here if someone else comes looking for this answer. Tried to clean it up a bit but you have some styles that i don't understand, like .introPar1 { margin-left:400px;margin-right:400px}
Anyway, see code below
body img {
max-width: 100%;
height: auto;
}
/* TOP NAVIGATION */
nav ul li a {
text-decoration: none;
margin: 20px;
padding: 20px;
border-style: solid;
border-color: grey;
display: block;
}
nav ul li {
float: left;
}
nav ul {
list-style-type: none;
float: left;
}
nav {
background-color: #f2f2f2;
padding: 10px;
float: left;
width: 100%;
box-sizing: border-box;
}
/* NAV HOVER */
nav a:hover {
background-color: blue;
border-color: orange;
border-style: solid;
color: white;
transition: .3s;
}
/* BANNER */
.banner {
text-align: center;
}
.banner img {
border-style: solid;
border-width: 10px;
border-color: #87CEEB;
}
/* BODY ELEMENTS */
.home {
font-weight: bold;
font-size: 20px;
}
.temp {
text-align: center;
margin: auto;
padding: 20px;
}
/* BACKGROUND */
.bgimage img {
pointer-events: none;
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.5;
position: fixed;
}
/* TEXT FORMATTING */
.introPar1 {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
font-size: 30px;
}
.introPar1 h1 {
text-align: center;
}
.contacts {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
font-size: 30px;
}
/* MOBILE FORMATTING */
#media (max-width: 1100px) {
introPar1 {
margin-right: 20px;
margin-left: 20px;
}
}
#media (max-width: 750px) {
body {
margin-right: 5vw;
margin-left: 5vw;
}
nav ul li a {
margin: 5px;
padding: 10px;
}
}
#media (max-width: 500px) {
body {
margin-right: 2vw;
margin-left: 2vw;
}
nav ul li {
width: 100%;
}
}
<div class="bgimage">
<img src="http://via.placeholder.com/1200x1000">
</div>
<nav>
<ul>
<li class="home">Crafts LLC</li>
<li>About Us</li>
<li>Contact Us</li>
</ul>
</nav>
<div class="banner"><img src="http://via.placeholder.com/350x150"></div>
<div class="Intro">
<article class="introPar1">
<h1><b><u>CRAFTS LLC</u></b></h1>
<br> Here at CRAFTS LLC, we offer you our 45 years of expertise of
<br> home repair advisory and remodeling services
<br>
<br> We are also here to help you with your estimation service needs
<br> and contractor referral services
<br>
<br> With CRAFTS LLC, you get both service and quality excellence.
<br> You need to look no further for your home repair and remodeling needs/solutions
<br>
</article>
</div>
<div class="contacts">
<p>Email to: craftsllc1#gmail.com or Call:813 347 7458</p>
</div>
Hey guys I am trying to apply flexbox on my wordpress site.
Based on what I know Flexbox is a shorthand of "Flexible Box Layout Module", which is a CSS3 module, standardized by the World Wide Web Consortium.
So I don't have to install anything, compliant browsers support it natively but for some reason it won't work on my site: http://americanbitcoinacademy.com/course-list/
Currently I am using flex on my codes:
<div class="flex">
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2017/01/The-Bitcoin-Transaction-Landscape.jpg" />
<h3 style="text-align: center;">BC 101 - The Bitcoin Transaction COURSE</h3>
<p>This course covers the basics of what Bitcoin is and how the Blockchain works, how to use a Bitcoin Wallet and why Bitcoin is important.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
</div>
.col-1-3 {
padding: 10px;
width: 28%;
float: left;
margin: 2.5%;
border: 1px solid #dedede;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
padding-bottom: 0px;
font-family: 'Lato', Verdana;
}
.col-1-3 img {
width: 100%;
}
.col-1-3 img {
width: 100%;
}
a {
margin: 0;
}
h3 {
margin: 15px auto;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
}
p{
line-height: 16px;
margin: 10px auto;
}
h4 {
margin: 0 0 20px 0;
}
}
.btn-block {
display: block;
width: 100%;
margin-top: 22px;
background: #DD374D;
}
button.btn-block{
background: #DD374D;
font-family: 'Roboto';
margin-bottom: 10px;
font-weight: bold;
}
}
#media only screen and (max-width: 767px) {
.col-1-3 {
width: 44%;
}
}
#media only screen and (max-width: 590px) {
.col-1-3 {
width: 94%;
}
}
.flex {
display: flex;
flex-wrap: wrap;
}
Which will do the trick to have equal size of the boxes NO MATTER HOW LONG IS THE CONTENT on that page by default.
Any idea why does the flexbox doesnt work?
Thank you in advance.
Your code works. You are probably not testing in a flex box capable browser:
http://caniuse.com/#search=flexbox
To align buttons to bottom:
.col-1-3 {
position: relative;
padding-bottom: 40px; /* offset height of button */
}
button.btn-block{
position: absolute;
bottom: 0px;
width: calc(100% - 20px);
}
So, I've been building sites for a good while, mainly utilizing Zurb Foundations for layout and responsive features. Recently, for the first time, I decided to hack it out from the ground up using media queries. My CSS is a little wonky (I, for some reason, had to push my second section down by 260px to avoid overlapping the first) but does the job just fine in Chrome. In Firefox and Safari however the two sections remain atop one another. Can anyone recommend a CSSolution for my issue?
Thanks,
John
/*home.css*/
p {
font-family: 'Droid Sans';
font-size: .8em;
}
h1, h2, h1 > a {
font-size: 1.2em;
font-weight: normal;
}
.landscape {
background-image: url("../img/landscape1.jpg");
background-size: cover;
border-radius: 25px;
height: 327px;
margin: 0 auto;
}
/*Styling for the Request A Quote form*/
.quote {
background-color: green;
font-size: .7em;
color: white;
z-index: -1;
}
.quote > h2 {
color: #fff;
font-size: 1.2me
}
input {
display: block;
width:180px;
color:black;
border-radius: 6px;
border: 1px solid #fff;
padding: 7px;
}
#submit {
width: 80px;
}
/*Landscape image settings for large screens*/
#media screen and (min-width: 900px) {
.landscape {
width: 890px;
height: 327px;
max-width: 1000px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Form styles for large screen*/
#media screen and (min-width: 700px) {
.quote {
float: right;
width: 220px;
height: 327px;
border-radius: 0 25px 25px 0;
padding: 0 15px;
}
.offer {
display: none;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Landscape styles for 700 > 900px screens*/
#media screen and (max-width: 900px) {
.landscape {
height: 327px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
#media screen and (max-width: 700px) {
.landscape {
width: 100%;
height: 200px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.quote {
position: relative;
top: 200px;
border-radius: 0 0 25px 25px;
padding: 10px 0 10px 0;
height: 240px;
float: none;
width: 60%;
}
form, .quote > h2 {
padding: 0 10px;
}
input {
width: 250px;
}
.offer {
display: block;
float: right;
background-color: #A8CD1B;
position: relative;
top: -60px;
z-index: 1;
width: 40%;
min-width: 120px;
height: 240px;
padding: 10px 20px;
border-radius: 0 0 25px 0;
}
.offer > p {
color: black;
font-size: .8em;
}
.your-yard-left {
width: 100%;
display: block;
position: relative;
top: -50px;
border-radius: 25px 0 0 25px;
width: 70%;
}
.your-yard-right {
width: 100%;
display: block;
position: relative;
top: -50px;
height: 260px;
}
}
#media screen and (max-width: 650px) {
.offer {
width: 30%;
}
.quote {
width: 70%;
}
}
#media screen and (max-width: 500px) {
.offer {
display: none;
}
.quote {
width: 100%;
}
.your-yard-left {
float: none;
position: relative;
border-radius: 25px 25px 25px 25px;
top: 260px;
overflow: none;
width: 100%;
}
.your-yard-right {
float: none;
position: relative;
top: 260px;
display: none;
}
}
.your-yard-left {
background-color: #A8CD1B;
float: left;
margin-top: 10px;
padding-right: 2%;
}
.your-yard-left > h2, .your-yard-left > p {
margin-left: 10px;
}
.your-yard-right {
background-color: green;
border-radius: 0 25px 25px 0;
margin-top: 10px;
width: 30%;
float: right;
z-index: 1;
overflow: hidden;
}
.your-yard-right img {
max-height: 150px;
display: block;
text-align: center;
margin: 10px auto;
}
.center {
clear: both;
}
#media screen and (min-width: 1010px) {
.your-yard {
max-width: 1000px;
}
.wrap {
max-width: 1000px;
margin: auto;
}
}
.wrap {
display: flex;
}
<!DOCTYPE html>
<html>
<head>
<title>Helping Hand Lawn Care</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="css/normalize.css">
<link href='https://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/menu.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<!--#include virtual="includes/nav.inc"-->
<div class="landscape">
<div class="quote">
<h2>Request A Quote!</h2>
<form>
<input type="text" id="name" placeholder="Name"><br/>
<input type="text" id="email" placeholder="Email"><br/>
<input type="text" id="phone" placeholder="Phone"><br/>
<input type="text" id="address" placeholder="Address"><br/>
<input type="submit" id="submit" value="Submit">
</form>
</div>
<div class="offer">
<h2>We'll Be In Touch</h2>
<p>Drop us a message and we'll have one of our certified landscape technicians come by, inspect your property and give you a quote. Our prices are always fair and our service always top notch. See what </p>
</div>
</div>
<div class="wrap">
<div class="your-yard-left">
<h2 class="center ">Your Yard, Your Pride, Your Way</h2>
<p>Since 2003, Helping Hand Lawn Care has serviced homes, businesses and governmental facilities throughout the Central Florida area in full-service landscape maintenance, installation, irrigation and pest control company. Our team has the experience, knowledge and dedication it takes to invision and execute the projects it takes to get your lawn looking great.<p>
<p>Contact us today to have a landscape professional offer a quote! We offer seasonal and annual packages for all size properties.
</div>
<div class="your-yard-right">
<img src="img/landscape2.jpg">
</div>
</div>
<!--
<div class="center">
<h2>Why Helping Hand?</h2>
<ul>
<li>Quality work</li>
<li>Consistent arrivals</li>
<li>Outstanding customer service</li>
<li>Over 15+ years industry experience</li>
</div>
-->
<script src="js/vendor/jquery.js"></script>
<script src="js/menu.js"></script>
<!-- Other JS plugins can be included here -->
</body>
</html>
I have add one property this media query
#media screen and (max-width: 700px) {
.wrap {
display: inherit !important;
}
}
/*home.css*/
p {
font-family: 'Droid Sans';
font-size: .8em;
}
h1, h2, h1 > a {
font-size: 1.2em;
font-weight: normal;
}
.landscape {
background-image: url("../img/landscape1.jpg");
background-size: cover;
border-radius: 25px;
height: 327px;
margin: 0 auto;
}
/*Styling for the Request A Quote form*/
.quote {
background-color: green;
font-size: .7em;
color: white;
z-index: -1;
}
.quote > h2 {
color: #fff;
font-size: 1.2me
}
input {
display: block;
width:180px;
color:black;
border-radius: 6px;
border: 1px solid #fff;
padding: 7px;
}
#submit {
width: 80px;
}
/*Landscape image settings for large screens*/
#media screen and (min-width: 900px) {
.landscape {
width: 890px;
height: 327px;
max-width: 1000px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Form styles for large screen*/
#media screen and (min-width: 700px) {
.quote {
float: right;
width: 220px;
height: 327px;
border-radius: 0 25px 25px 0;
padding: 0 15px;
}
.offer {
display: none;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Landscape styles for 700 > 900px screens*/
#media screen and (max-width: 900px) {
.landscape {
height: 327px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
#media screen and (max-width: 700px) {
.landscape {
width: 100%;
height: 200px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.quote {
position: relative;
top: 200px;
border-radius: 0 0 25px 25px;
padding: 10px 0 10px 0;
height: 240px;
float: none;
width: 60%;
}
form, .quote > h2 {
padding: 0 10px;
}
input {
width: 250px;
}
.offer {
display: block;
float: right;
background-color: #A8CD1B;
position: relative;
top: -60px;
z-index: 1;
width: 40%;
min-width: 120px;
height: 240px;
padding: 10px 20px;
border-radius: 0 0 25px 0;
}
.wrap {
display: inherit !important;
}
.offer > p {
color: black;
font-size: .8em;
}
.your-yard-left {
width: 100%;
display: block;
position: relative;
top: -50px;
border-radius: 25px 0 0 25px;
width: 70%;
}
.your-yard-right {
width: 100%;
display: block;
position: relative;
top: -50px;
height: 260px;
}
}
#media screen and (max-width: 650px) {
.offer {
width: 30%;
}
.quote {
width: 70%;
}
}
#media screen and (max-width: 500px) {
.offer {
display: none;
}
.quote {
width: 100%;
}
.your-yard-left {
float: none;
position: relative;
border-radius: 25px 25px 25px 25px;
top: 260px;
overflow: none;
width: 100%;
}
.your-yard-right {
float: none;
position: relative;
top: 260px;
display: none;
}
}
.your-yard-left {
background-color: #A8CD1B;
float: left;
margin-top: 10px;
padding-right: 2%;
}
.your-yard-left > h2, .your-yard-left > p {
margin-left: 10px;
}
.your-yard-right {
background-color: green;
border-radius: 0 25px 25px 0;
margin-top: 10px;
width: 30%;
float: right;
z-index: 1;
overflow: hidden;
}
.your-yard-right img {
max-height: 150px;
display: block;
text-align: center;
margin: 10px auto;
}
.center {
clear: both;
}
#media screen and (min-width: 1010px) {
.your-yard {
max-width: 1000px;
}
.wrap {
max-width: 1000px;
margin: auto;
}
}
.wrap {
display: flex;
}
<!DOCTYPE html>
<html>
<head>
<title>Helping Hand Lawn Care</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="css/normalize.css">
<link href='https://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/menu.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<!--#include virtual="includes/nav.inc"-->
<div class="landscape">
<div class="quote">
<h2>Request A Quote!</h2>
<form>
<input type="text" id="name" placeholder="Name"><br/>
<input type="text" id="email" placeholder="Email"><br/>
<input type="text" id="phone" placeholder="Phone"><br/>
<input type="text" id="address" placeholder="Address"><br/>
<input type="submit" id="submit" value="Submit">
</form>
</div>
<div class="offer">
<h2>We'll Be In Touch</h2>
<p>Drop us a message and we'll have one of our certified landscape technicians come by, inspect your property and give you a quote. Our prices are always fair and our service always top notch. See what </p>
</div>
</div>
<div class="wrap">
<div class="your-yard-left">
<h2 class="center ">Your Yard, Your Pride, Your Way</h2>
<p>Since 2003, Helping Hand Lawn Care has serviced homes, businesses and governmental facilities throughout the Central Florida area in full-service landscape maintenance, installation, irrigation and pest control company. Our team has the experience, knowledge and dedication it takes to invision and execute the projects it takes to get your lawn looking great.<p>
<p>Contact us today to have a landscape professional offer a quote! We offer seasonal and annual packages for all size properties.
</div>
<div class="your-yard-right">
<img src="img/landscape2.jpg">
</div>
</div>
<!--
<div class="center">
<h2>Why Helping Hand?</h2>
<ul>
<li>Quality work</li>
<li>Consistent arrivals</li>
<li>Outstanding customer service</li>
<li>Over 15+ years industry experience</li>
</div>
-->
<script src="js/vendor/jquery.js"></script>
<script src="js/menu.js"></script>
<!-- Other JS plugins can be included here -->
</body>
</html>
So, the addition of
.wrap {
display: inherit !important
}
resolved the issue of differences in Safari and Firefox compared to Chrome. For the problem with the second section rendering vertically I noticed I had included padding-right of 2% to one of the divs without accounting for this in the divs width. Thanks for the help!
I have a problem with the alignment of two divs. I'm using bootstrap for a responsive page.
This is the image on desktop
This is the image on mobile
It's like the image isn't adjusting itself with the container div and just staying in the original position.
this is the HTML code:
<div class="Guy">
<div class="img_guy">
<img src="./images/profile1.png" class="img-circle img-responsive">
</div>
<div class="Content">
<h1 class="tagline">JAMES H. MAYER, ESQ.</h1>
<br>
<h2 class="tagline">San Diego's "Top Lawyers" (Mediation)</h2>
<h2 class="tagline">San Diego Magazine 2012-2015" (Mediation)</h2>
</div>
</div>
This is the CSS code:
.Guy {
margin: 2% auto;
float:left;
max-width: 800px;
overflow:hidden;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .5);
box-shadow: 0 0 8px rgba(0, 0, 0, .8);
border-radius: 112px;
}
.img_guy {
float:left;
width:40%;
height:64%;
}
.Content {
float:left;
width: 45%;
height:60%;
}
.Content h1 {
color: #E4A500;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 100%;
}
.Content h2 {
color: #e1e8f0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 90%;
}
Any hint that may be causing this?
Here's an example of how this could be done so it keeps a highly responsive nature from mobile up.
See example Snippet at Full page then reduce your browser.
#guy {
background: url('http://www.getitdonecleaning.co.uk/wp-content/uploads/2013/11/office-cleaning-fife.jpg') center center no-repeat;
background-size: cover;
color: white;
}
.people-list {
max-width: 600px;
padding: 10px;
margin-top: 10px;
margin-bottom: 10px;
background-color: rgba(0, 0, 0, .5);
border-radius: 112px;
}
.profile,
.details {
display: table-cell;
vertical-align: middle;
padding: 10px;
}
.details h2 {
color: #E4A500;
font-size: 150%;
margin: 15px auto;
}
.details h3 {
color: white;
font-size: 100%;
margin: 10px auto;
}
#media (max-width: 480px) {
.profile img {
height: 150px;
}
.people-list {
max-width: 100%;
}
.profile,
.details {
margin-right: 2px;
margin-left: 2px;
}
.details h2 {
font-size: 120%;
}
.details h3 {
font-size: 90%;
}
}
#media (max-width: 360px) {
.people-list {
border-radius: 0;
}
.profile,
.details {
display: block;
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="jumbotron" id="guy">
<div class="container">
<h1>Some other Title Here</h1>
<div class="people-list">
<div class="profile">
<img src="http://lorempixel.com/200/200/people" class="img-circle" />
</div>
<div class="details">
<h2>JAMES H. MAYER, ESQ.</h2>
<h3>San Diego's "Top Lawyers" (Mediation)</h3>
<h3>San Diego Magazine 2012-2015" (Mediation)</h3>
</div>
</div>
</div>
</div>
Update
As far as the structure goes: using a jumbotron in this instance makes sense since you're using Bootstrap (it takes care of your H1 and background for the most part), then placing all your elements inside a div to create a space for your image and text (.people-list) so you can set margin/padding/width etc independently of the objects enclosed within.
For the image/text inside using display:table-cell will do just that, it will treat those elements like s along with vertical-align so everything is centered inside your main div.
The rest comes down to using media queries to adjust all the sizes to your image/text isn't crushed together and remains readable and user friendly.
(Note: I also took the chance to refactor this somewhat as I had some duplicate/unnecessary rules.)
Sidenote: Why I changed the display to block under 360px. There are many devices (namely iPhone 4/5) that have a CSS width of 320px. Trying to display the image and text side-by-side on a small screen isn't ideal for many reasons.
*See image and Example Snippet by re-sizing your browser. And test on actual devises, this can't be stressed enough.
Unchanged display property: to be viewed down to 320px (*You may need to use Firefox if you use a desktop)
And please note, there is no display: row property: See MDN
#guy {
background: yellow;
color: white;
}
.people-list {
max-width: 600px;
padding: 10px;
margin-top: 10px;
margin-bottom: 10px;
background-color: rgba(0, 0, 0, .5);
border-radius: 112px;
}
.profile,
.details {
display: table-cell;
vertical-align: middle;
padding: 10px;
}
.details h2 {
color: #E4A500;
font-size: 150%;
margin: 15px auto;
}
.details h3 {
color: white;
font-size: 100%;
margin: 10px auto;
}
#media (max-width: 480px) {
#guy {
background: teal;
}
.profile img {
height: 150px;
}
.people-list {
max-width: 100%;
}
.profile,
.details {
margin-right: 2px;
margin-left: 2px;
}
.details h2 {
font-size: 120%;
}
.details h3 {
font-size: 90%;
}
}
#media (max-width: 360px) {
#guy {
background: lightblue;
}
.people-list {
border-radius: 0;
}
}
#media (max-width: 320px) {
#guy {
background: red;
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="jumbotron" id="guy">
<div class="container">
<h1>Some other Title Here</h1>
<div class="people-list">
<div class="profile">
<img src="http://lorempixel.com/200/200/people" class="img-circle" />
</div>
<div class="details">
<h2>JAMES H. MAYER, ESQ.</h2>
<h3>San Diego's "Top Lawyers" (Mediation)</h3>
<h3>San Diego Magazine 2012-2015" (Mediation)</h3>
</div>
</div>
</div>
</div>