I have created a child theme of Twenty Thirteen and am doing some updates to it. I have a dev site that is pretty much a copy of the live site. The only thing that I changed in the footer area is the widget title styles but I can't get the 3 widgets to line up. I currently have 2 on the first line and 1 down below. It doesn't seem to matter if I change the container width.
Here is the new version of the site: http://dev.unitedconstruction.com/
Here is the old site that still works:http://unitedconstruction.com/
Can anyone see where my problem is?
CSS (most of what pertains to the footer)
/* FOOTER */
.site-footer .sidebar-container, .site-footer {
background-color: #fff; /*#C6C6C7;*/
}
.site-footer .sidebar-container {
min-height: 335px;
padding: 20px 0 0;
border-top: 0 solid #0069AA;
}
.site-footer .widget{
width: 100% !important;
max-width: 333px !important;
border-bottom: 5px solid #0069AA;
background-color: #fff;
min-height: 358px;
float:left;
font-size: 14px;
margin: 0 0 24px;
padding: 0 0 10px 0;
word-wrap: break-word;
color: #333;
}
.widget .widget-title {
font: normal 24px Arial, Helvetica, sans-serif;
margin: 0;
}
.site-footer .widget-title, .site-footer .widget-title a, .site-footer .wp-caption-text {
font: normal 24px 'Open Sans', Arial, Helvetica, sans-serif;
color: #000;
background-color: transparent;
margin: 0;
padding: 5px 0;
border-bottom:2px solid #FDFDFD;
word-spacing:0;
text-transform: capitalize;
}
.site-footer .widget-title span{
color: #000;
font-weight:normal;
}
.site-footer .widget li {
padding:0 0 10px;
}
HTML
<footer role="contentinfo" class="site-footer" id="colophon">
<div role="complementary" class="sidebar-container" id="secondary">
<div class="widget-area masonry" style="position: relative; height: 399px;">
<aside class="widget widget_flexible-recent-posts-widget masonry-brick" id="flexible-recent-posts-widget-3" style="position: absolute; left: 0px; top: 0px;"><div class="frp-widget-wrapper frp-widget-">
<div class="frp-clear"></div>
<ul class="frp-widget">
<li class="frp-news">
<h3 class="widget-title"><span>united</span> news</h3>
<div class="frp-clear"></div>
<div class="frp-left">
<img width="333" height="200" alt="United Construction" class="attachment-333x333 wp-post-image" src="http://unitedconstruction.com/wp-content/uploads/2015/12/featured-image-Phase-II-Groundbreaking.jpg">
</div>
<div class="news-widget-info">
<div class="news-widget-title">
<a class="news-widget-link" href="http://unitedconstruction.com/united-celebrates-groundbreaking-for-new-1-6-million-sf-business-park/">United Celebrates Groundbreaking for New 1.6 Million SF Industrial Park</a>
</div>
<div class="arpw-summary">UC breaks ground on new industrial park in North Reno. The first tenant, Jarden Technical Apparel, consisting of Marmot and ExOfficio, is pre-leasing 270,000 SF</div>
</div>
<div class="frp-clear"></div>
</li>
</ul>
<div class="frp-all-category-news frp-all-category-news-footer">read more >></div>
</div>
</aside><aside class="widget arpw_widget random-posts masonry-brick" id="arpw_widget-2" style="position: absolute; left: 353px; top: 0px;">
<h3 class="widget-title"><span>united</span> projects</h3>
<div class="arpw-block">
<ul>
<li class="arpw-clearfix">
<a rel="bookmark" title="Permalink to Lake Washington Partners – SanMar Distribution Center" href="http://unitedconstruction.com/otw-portfolio/lake-washington-partners-sanmar-distribution-center-showroom/">
<img width="333" height="200" title="Lake Washington Partners – SanMar Distribution Center" alt="Lake Washington Partners – SanMar Distribution Center" class="arpw-alignleft wp-post-image" src="http://unitedconstruction.com/wp-content/uploads/2015/06/featured-image-sanmar.jpg"> </a>
<h3 class="arpw-title">
<a rel="bookmark" title="Permalink to Lake Washington Partners – SanMar Distribution Center" href="http://unitedconstruction.com/otw-portfolio/lake-washington-partners-sanmar-distribution-center-showroom/">Lake Washington Partners – SanMar Distribution Center</a>
</h3>
<div class="arpw-summary">621,738 SFt build-to-suit distribution center features automated…</div>
</li>
</ul>
<div class="frp-all-category-news frp-all-category-news-footer"> <a title="See More United Construction Projects" href="?page_id=32">read more >></a> </div>
</div><!-- .arpw-block - http://wordpress.org/plugins/advanced-random-posts-widget/ -->
</aside><aside class="widget widget_flexible-recent-posts-widget masonry-brick" id="flexible-recent-posts-widget-2" style="position: absolute; left: 706px; top: 0px;"><div class="frp-widget-wrapper frp-widget-">
<div class="frp-clear"></div>
<ul class="frp-widget">
<li class="frp-news">
<h3 class="widget-title"><span>united</span> community</h3>
<div class="frp-clear"></div>
<div class="frp-left">
<img width="333" height="200" alt="Thank You STEP2" class="attachment-333x333 wp-post-image" src="http://unitedconstruction.com/wp-content/uploads/2015/12/featured-image-STEP2-Thank-you.jpg">
</div>
<div class="news-widget-info">
<div class="news-widget-title">
<a class="news-widget-link" href="http://unitedconstruction.com/honored-by-step2-recognition/">Honored by STEP2 Recognition</a>
</div>
<div class="arpw-summary">United Construction is honored by STEP2's acknowledgement during the recent Homes For The Holiday event.</div>
</div>
<div class="frp-clear"></div>
</li>
</ul>
<div class="frp-all-category-news frp-all-category-news-footer">read more >></div>
</div>
</aside> </div><!-- .widget-area -->
</div><!-- #secondary -->
</footer>
One major difference I'm noticing is that the height on your widget area div (class="widget-area masonry") is different.
The broken site has div height of height: 764px while the functioning site has height: 382px.
This is giving the three divs room to stack ontop of each other.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I apologize for the vague title, but my issue is fairly specific. I'm currently converting our site to use Bootstrap, and I've come across a small thing that bugs me with the header (jumbotron). When viewed on mobile, or with a xsmall/small screen size, the words "Service" and "Agency" will force down to the next line and display underneath our tree logo (shown in pictures)
EDIT: Forgot to mention, I cannot just simply split the tree logo and words into two different columns, as this forces them to appear on opposite ends of the screen when viewed on desktop.
Small Screen
XSmall Screen
Desktop Screen
Instead, I'd like for the words "Human", "Service", and "Agency" all to display stacked on top of one another, next to the tree, when viewed on small or xsmall screens. Any ideas on how to approach this?
HTML:
<html>
<head>
<title>HSA - Community Support Provider</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="We offer case management, psychiatric care, counseling to people with mental illness and additctions, and services for people with developmental disabilities." />
<meta name="keywords" content="counselor, mental illness, disabilities, Watertown, SD, psychiatrist, counseling, mental health, addiction, services, developmentally disabled, detoxification, half-way house" />
<meta name="robots" content="index, follow" />
<link rel="stylesheet" type="text/css" href="css/styles.css" media="screen" />
<link rel="shortcut icon" href="/images/hsa.ico" type="image/hsa-icon" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<style>
h4 {
font-size: 18px !important;
}
#media only screen and (max-width: 480px) {
#heading_title {
display: inline-block;
}
}
</style>
</head>
<body>
<div class="jumbotron text-left" style="padding-top:10px;padding-bottom:0;margin-bottom:0;background-color:white">
<div class="row">
<div class="col">
<h1 id="heading">
<img src="images/HSA-tree-logo.gif" alt="HSA's Tree Logo"/>
<span id="heading_title">Human Service Agency</span>
</h1>
</div>
</div>
</div>
<nav class="navbar navbar-expand-sm bg-light navbar-light" style="border-bottom:1px solid #000;">
<a class="navbar-brand" href="index.html">Home</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="mhstaff.html">Counselors</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jobs.html">Career Opportunities</a>
</li>
<li class="nav-item">
<a class="nav-link" href="foundation.html">Foundation/Donations</a>
</li>
<li class="nav-item">
<a class="nav-link" href="bod.html">Board of Directors</a>
</li>
<li class="nav-item">
<a class="nav-link" href="aboutus.html">About/Contact Us</a>
</li>
</ul>
</div>
</nav>
<div class="justify-content-center" style="background-color:#f8f9fa;color:#7c7c7d;">
<div class="row">
<div class="col">
<p id="addressbar">123 19th Street NE, Watertown, SD (605) 886-0123</p>
</div>
</div>
</div>
<div class="deptcards">
<div class="row">
<div class="col-lg-2 col-sm-4 col-6">
<div class="deptcard">
<a href="addictions.html" title="Addiction Services" accesskey="A" target="_self">
<div align="center"><img class="deptimg" src="images/group_counseling.jpg" alt="Group Counseling">
<div class="deptcontainerone"></div>
<p><b>Addictions</b></p>
</div>
</a>
</div>
</div>
<div class="col-lg-2 col-sm-4 col-6">
<div class="deptcard">
<a href="mh.html" title="Mental Health Services" accesskey="M" target="_self">
<div align="center"><img class="deptimg" src="images/mh.jpg" alt="Mental Health" >
<div class="deptcontainertwo"></div>
<p><b>Behavioral Health</b></p>
</div>
</a>
</div>
</div>
<div class="col-lg-2 col-sm-4 col-6">
<div class="deptcard">
<a href="serenityhills.html" title="Serenity Hills" accesskey="S" target="_self">
<div align="center"><img class="deptimg" src="images/serenity_hills.jpg" alt="Serenity Hills" >
<div class="deptcontainerthree"></div>
<p><b>Serenity Hills</b></p>
</div>
</a>
</div>
</div>
<div class="col-lg-2 col-sm-4 col-6">
<div class="deptcard">
<a href="nh.html" title="New Horizons" accesskey="N" target="_self">
<div align="center"><img class="deptimg" src="images/new_horizons.jpg" alt="New Horizons">
<div class="deptcontainerfour"></div>
<p><b>New Horizons</b></p>
</div>
</a>
</div>
</div>
<div class="col-lg-2 col-sm-4 col-6">
<div class="deptcard">
<a href="Employment Services/index.html" title="Employment Services" accesskey="E" target="_self">
<div align="center"><img class="deptimg" src="images/employment_connections.jpg" alt="Employment Connections" >
<div class="deptcontainerfive"></div>
<p><b>Job Services</b></p>
</div>
</a>
</div>
</div>
<div class="col-lg-2 col-sm-4 col-6">
<div class="deptcard">
<a href="care.html" title="CARE" accesskey="C" target="_self">
<div align="center"><img class="deptimg" src="images/care.jpg" alt="C.A.R.E." >
<div class="deptcontainersix"></div>
<p><b>C.A.R.E.</b></p>
</div>
</a>
</div>
</div>
</div>
</div>
<div id="layoutdimsend"></div>
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-12 col-12" id="columnside">
<h3 align="center">Links</h3>
<p align="center"><img src="images/neprc_logo_sm.jpg" alt="NEPRC"/></p>
<p align="center"><img src="images/why_logo_sm.jpg" alt="WHY" /></p>
<p align="center"><img src="images/facebook_link.jpg" alt="Facebook Link"/></p>
<p align="center"><h2 align="center"><img src="images/umbrella.jpg" alt="Umbrella Newsletter Link"/></h2></p>
<div class="stylegray">
<p align="center"><img src="images/nami.jpg" alt="NAMI SD Link"/></p>
<div align="center">
<img class="columnimage" src="images/amazon_smile.jpg" alt="Amazon Smile" />
</div>
<p align="center" class="stylegray">Sign up at smile.amazon.com</p>
<p class="stylenorm">Amazon will donate 0.5% of the price of your eligible AmazonSmile purchases to the Human Service Agency if you have signed up to participate. AmazonSmile is the same as Amazon. Same products, prices, and service.</p>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12" id="columnmid">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<div align="center">
<h1>Remembrance Ceremony</h1>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/kxXfHuuJQJg" frameborder="0" alt="Slide 1" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p>Glacial Lakes SAFE (Suicide Awareness for Everyone) hosted their 6th annual Remembrance Ceremony on September 2, 2020. With the assistance of Prairie Lakes Healthcare System, SAFE was able to host this year's event virtually. September is Suicide Awareness month, and we are encouraging those who have lost a loved one to suicide to do something to honor them and to help raise awareness of the impact of suicide. We want you to know that there is HOPE; there is healing; and there are many resources and services available to help 24/7. You are not alone.</p>
</div>
</div>
<div class="carousel-item">
<div align="center">
<h1>Stakeholders Give HSA High Marks</h1>
<img src="images\stakeholders.png" style="width:100%" alt="Slide 2">
<p>A recent stakeholder survey of HSA gave high ratings to the agency across the board. A few of the comments made included, "Our community is a better place because of the fine men and women of HSA!", "HSA is a community leader in promoting holistic health," "Clients attending treatment state the services offered are informative, they are challenged to invest themselves in the provided treatment," "There is a strong partnership between HSA and Law Enforcement. Every referral I have ever made was met with nothing but professional courtesy," "The on call service is available day or night," and "HSA is very accommodating to the needs of our high school students."</p>
</div>
</div>
<div class="carousel-item">
<div align="center">
<h1>Employment Connections/Employment Services</h1>
<img src="images\landscaping.jpg" style="width:100%" alt="Slide 3">
<p>Pictured: Anthony Kinsinger enjoys his new positon with Professional Landscaping. Anthony is the inventory/plant caretaker and takes care of animals on the property. Community Services helps people find jobs in the community. They work closely with the local Vocational Rehabilitation office and businesses in town. New Horizons also provides Project Skills, a job program for students with disabilities. New Horizons also provides job class for students. We have so many success stories and examples of the benefits available to employers when they hire people with disabilities. Read more about it on our employment services page.</p>
</div>
</div>
<div class="carousel-item">
<div align="center">
<h1>HSA Foundation: Making Dreams Come True</h1>
<img src="images\mt_olympus.jpg" style="width:100%" alt="Slide 4">
<p>The Human Service Agency Foundation raises money and accepts donations to help with special projects for people served. This summer Sandy Tierney was able to go to Wisconsin with the help of ‘Making Dreams Come True’and funding from the HSA Foundation. </p>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-12 col-12" id="columnside">
<h3 align="center">Resources</h3>
<p><h4>Crisis line:</h4></p>
<div class = "stylenorm" align="left">
<p>Call 605-886-0123 <strong>24 Hours/Day</strong></p>
<p>In Sisseton, call 605-698-7688</p>
</div>
<h4>Counseling Appointments<br /> and Addiction Services:</h4>
<div class = "stylenorm" align="left">
<p>Call 605-886-0123</p>
<p>Monday-Thursday 8 AM-8 PM, Fridays 8 AM-5PM</p>
<p>In Sisseton, call 605-698-7688</p>
<p>In Milbank, call 605-886-0123</p>
</div>
<h4>Alcoholics Anonymous Meetings</h4>
<h4>Prevention Resource Library</h4>
<h4>Watertown Family Resource Directory</h4>
<h4>Watertown Family Resource Directory - Online</h4>
<h4>Watertown Community Foundation</h4>
<p align="left" class="stylenorm">Apply to Serenity Hills</p>
<p align="left" class="stylenorm">Hire People with Disabilities</p>
<p align="left" class="stylenorm">Request CARE/NE Payee Services</p>
<p align="left" class="stylenorm">Conflict Free Case Management Services</p></br>
<h3 align="center">Forms</h3>
<p align="left" class="stylenorm">Release of Information</p></br>
<p align="left" class="stylenorm">Intake Questionnaire</p>
<p align="left" class="stylenorm">Adult Questionnaire</p>
<p align="left" class="stylenorm">Child Questionnaire</p>
</div>
</div>
</div>
<div id="footer">
<p class="footerlinks" text-align="center" ><a class="footerlinks" Href="TermsAndConditions.html">Terms and Conditions</a><a class="footerlinks" href="privacystatement.html">Privacy Statement</a><a class="footerlinks" href="privacypractices.html">Privacy of Health Information</a></p>
<p class="footerstyle1" text-align="center"><span class="style5">Human Service Agency is an equal opportunity employer and provider</span></p>
<p align="center"> <img src="images\united_way.gif" alt="United Way" style="max-height:40px" /> <img src="images\accredited.jpg" alt="Accredited by CQL" style="max-height:40px" /> <img src="images\eho.bmp" alt="Equal Housing Opportunity" style="max-height:40px"/></p>
<p class="footerstyle6">The Human Service Agency provides services for anyone seeking assessment, treatment & aftercare for any substance abuse/dependency. We do not discriminate on the basis of race, color, religion, gender, gender expression, age, national origin, disability, marital status, sexual orientation, military status, familial status, or any other classification protected by applicable federal, state or local law. We do prioritize services for pregnant women or women with dependent children. We also prioritize treatment for individuals using intravenous drugs as the lethality of such use is severe and life threatening. <br />We seek to provide services for these priority groups by publicizing this notice in our agencies as well as on our website. Pregnant women who also use intravenous drugs are of highest priority. In the event the individual in any priority population is waiting for a residential bed in a residential facility elsewhere, he/she will be allowed participation in HSA Intensive Outpatient Treatment Program until placement is made. </p>
<p class="footerstyle6"><span class="footerstyle7">Policy: The Human Service Agency provides safeguards designed to protect the personal information of its personnel and clients. These safeguards include efforts to keep personal information confidential, limits access to only those personnel who need this information, prevents the unlawful disclosure of this information, and effectively disposes of this information in a manner that ensures that it is not retrievable after disposal. The Human Service Agency continually works to comply with all federal and state law regarding the protection of personal information. Any Human Service Agency staff member who violates this policy may be subject to civil or criminal penalties and the breach of confidentiality could lead to disciplinary action (up to and including termination of employment). Personal Information is defined as: non-public information which is associated with a specfiic individual through one or more identifiers. Examples include Social Security numbers, drivers' license numbers, credit or debit card numbers and health insurance identification numbers.<br />Copyright © 2017 Human Service Agency</span></p>
<p></p>
</div>
</body>
</html>
CSS
.container {
background-color: #FFFFFF;
}
p {
margin: 0;
}
a {
color: #003366;
}
a:hover {
color: #fff;
background: #CCCCCC;
text-decoration: none;
}
a:link {
color:#003399;
}
a:visited {
color: #003399;
}
img {
margin: 10px 0 5px;
}
h1, h2, h3 {
color: #369;
}
.header {
border-bottom: 1px solid #000;
}
.header ul {
list-style: none;
text-align: center;
clear: left;
float: left;
width: 100%;
margin: 10px 0 0 0;
padding: 0;
text-align: center;
left: 50%;
}
.header ul li {
list-style: none;
display: inline;
margin: 0;
padding: 0;
right: 50%;
}
.header ul li a {
display: block;
float: left;
margin: 0 0 0 1px;
padding: 3px 10px;
text-align: center;
background: #eee;
color: #000;
text-decoration: none;
position: relative;
left: 15px;
line-height: 1.3em;
}
.header ul li a:hover {
background:#369;
color:#fff;
}
.header ul li a.active,
.header ul li a.active:hover {
color:#fff;
background:#000;
font-weight:bold;
}
.header ul li a span {
display:block;
}
#addressbar{
clear:both;
color:#FFFFFF;
background-color: #004000;
margin:0;
padding:6px 15px !important;
text-align:center;
}
#layoutdimsend{
clear:both;
color: #FFFFFF;
border-top:4px solid #004000;
margin:0;
padding:2px 5px !important;
text-align:center;
}
.deptcard {
transition: 0.3s;
border-radius: 3px;
float: left;
padding: 10px;
text-decoration: none;
}
.deptcard:hover {
box-shadow: 0 12px 20px 0 rgba(0,0,0,0.8);
text-decoration: none;
}
.deptimg {
border-radius: 5px 5px 0 0;
}
.deptcontainerone {
margin: 7px;
padding-top: 2px;
padding-right: 16px;
padding-bottom: 2px;
padding-left: 16px;
background-color:#008000;
}
.deptcontainertwo {
margin: 7px;
padding-top: 2px;
padding-right: 16px;
padding-bottom: 2px;
padding-left: 16px;
background-color:#003399;
}
.deptcontainerthree {
margin: 7px;
padding-top: 2px;
padding-right: 16px;
padding-bottom: 2px;
padding-left: 16px;
background-color:#1E90FF;
}
.deptcontainerfour {
margin: 7px;
padding-top: 2px;
padding-right: 16px;
padding-bottom: 2px;
padding-left: 16px;
background-color:#800000;
}
.deptcontainerfive {
margin: 7px;
padding-top: 2px;
padding-right: 16px;
padding-bottom: 2px;
padding-left: 16px;
background-color:#800080;
}
.deptcontainersix {
margin: 7px;
padding-top: 2px;
padding-right: 16px;
padding-bottom: 2px;
padding-left: 16px;
background-color:#FF1493;
}
#footer {
clear:both;
float:left;
width:100%;
border-top:1px solid #000;
background:#00400;
}
#footer p {
padding:10px;
margin:0;
background-color: #004000;
}
.footerstyle1 {
color: #FFFFFF;
text-align:center;
}
.footerstyle4 {
color: #FFFFFF;
font-size: 10;
}
.footerstyle5 {
font-size: 14px;
font-weight: bold;
}
.footerstyle6 {
color: #FFFFFF;
font-size: x-small;
text-align:center;
}
.footerstyle7 {
font-size: x-small;
text-align: center;
}
#footer .footerlinks {
color: #FFFF99;
text-align: center;
}
- For the slide show -
* {box-sizing:border-box}
/* Slideshow container */
.slideshow-container {
max-width: 600px;
position: relative;
margin: auto;
clear: both;
}
.mySlides {
display: none;
}
/* Next & previous buttons */
.prev, .next {
cursor: pointer;
position: absolute;
top: 50%;
width: auto;
margin-top: -22px;
padding: 16px;
color: white;
font-weight: bold;
font-size: 18px;
transition: 0.6s ease;
border-radius: 0 3px 3px 0;
}
/* Position the "next button" to the right */
.next {
right: 0;
border-radius: 3px 0 0 3px;
}
/* Number text (1/3 etc) OR Header*/
.numbertext {
background-color: rgba(33,66,88,0.8);
font-weight: bold;
color: #f2f2f2;
font-size: 18px;
padding: 8px 18px;
position: absolute;
bottom: 85px;
width: 100%;
}
/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
background-color: rgba(33,66,88,0.8);
}
/* The dots/bullets/indicators */
.dot {
cursor:pointer;
height: 13px;
width: 13px;
margin: 0 2px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
transition: background-color 0.6s ease;
}
.active, .dot:hover {
background-color: #717171;
}
/* Fading animation */
.fade {
-webkit-animation-name: fade;
-webkit-animation-duration: 1.5s;
animation-name: fade;
animation-duration: 1.5s;
}
#-webkit-keyframes fade {
from {opacity: .2}
to {opacity: 1}
}
#keyframes fade {
from {opacity: .2}
to {opacity: 1}
}
- End for the slide show -.rowtwo
/*Here we have the options for the side navigation that is off canvas - the complete listing of services */
/* The drop down button menu */
/* Dropdown Button */
.dropbtn {
background-color: #4CAF50;
color:#666666;
padding: 8px;
font-size: 10px;
border:thin;
cursor: pointer;
}
/* Dropdown button on hover & focus */
.dropbtn:hover, .dropbtn:focus {
background-color: #3e8e41;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 240px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
color: black;
padding: 6px 8px;
text-decoration: none;
display: block;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color:#000000;
}
/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color:#3e8e41}
/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
.show {display:block;} .columnimage {
text-align: center;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #3366CC;
border-right-color: #3366CC;
border-bottom-color: #3366CC;
border-left-color: #3366CC;
}
.stylegray {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color:#333333;
}
.stylenorm {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color:#000000;
}
#columnside {
background-color: #eee;
}
table, th, td {
border: 1px solid black;
}
.labels {
font-size: 10px;
}
#heading {
color: black;
}
.carousel-item {
background-color: white;
}
ol li {
color: black;
background-color; black;
}
Replace this:
<div class="row">
<div class="col">
<h1 id="heading">
<img src="images/HSA-tree-logo.gif" alt="HSA's Tree Logo"/>
<span id="heading_title">Human Service Agency</span>
</h1>
</div>
</div>
With this:
<div class="row align-items-center">
<div class="col-6 col-sm-4 col-lg-2">
<img src="images/HSA-tree-logo.gif" class="img-fluid" alt="HSA's Tree Logo">
</div>
<div class="col">
<h1 id="heading">
<span id="heading_title">Human Service Agency</span>
</h1>
</div>
</div>
So my body is set at 1140px, however, I'd like my footer to be stretched across the screen. I have messed with so many codes, yet, I can't seem to find out what the reason is.. I have done a lot of research online and most people seemed to recommend margin: 0; but that didn't seem to help either.
There's so many codes behind this, that it seems like something else is messing with it.
footer {
background-color: #333;
width: 100%;
height: 320px;
position: relative;
}
.footer-body {
background-color: #333;
width: 60%;
height: 320px;
margin-left: 22%;
padding: 10px 0px 10px 20px;
position: relative;
color: #FFF;
font-family: 'Raleway', sans-serif;
}
footer p {
line-height: 20px;
margin: 10px 10px 0px 0px;
}
.map-address {
margin-top: 21px;
margin-bottom: 30px;
}
.footer-links {
color: #FFF;
font-size: 12px;
}
.widgetarea {
width: 100%;
text-align: center;
}
<footer>
<!--<div class="row">-->
<!-- Info Widget Start -->
<div class="footer-body">
<div class="col-lg-3 clearfix custom1" style="margin-top: 15px;">
<span style="font-size: 32px; font-weight: bold; color: #FFF;">ThanksOffice</span><span style="font-size: 32px; font-weight: bold; color: #ebb621;">.com</span>
<p style="font-size: 13px; line-height: 18px; color: #FFF;">ThanksOffice is a new concept of office space-sharing. Through ThanksOffice, everybody can share their unused spaces with flexible time-based options and also make a profit for sharing ThanksOffice with others</p>
</div>
<!-- Maps Widget Start -->
<div class="col-lg-4 col-sm-6 clearfix responsive-big-margin custom2">
<div class="map-address">
<span style="font-weight: bold; color: #fff; font-size:20px;">Contact Information</span><br>
<p>
<span style="color: #ebb621; font-weight: bold; font-size: 13px;">AddR:</span> <span style="color: #FFF; font-size: 13px;">3235 Satellite Blvd Bldg 400 Suite 290, Duluth, GA 30096</span>
<span style="color: #ebb621; font-weight: bold; font-size: 13px;">Email:</span> <span style="color: #FFF; font-size: 13px;">support#thanksoffice.com</span><br /><br />
</p>
<a href="https://www.facebook.com/tmpospro/?view_public_for=152376381930187" target="_blank">
<img src="/images/icon_facebook_white.png" width="20" style="margin-right: 20px;"></a>
<a href="https://www.instagram.com/tmposthanks/" target="_blank">
<img src="/images/icon_instagram_white.png" width="20" style="margin-right: 20px;"></a>
<a href="https://twitter.com/TMPOSTHANKS" target="_blank">
<img src="/images/icon_twitter_white.png" width="20" style="margin-right: 20px;"></a>
<a href="https://www.pinterest.com/tmposthanks/" target="_blank">
<img src="/images/icon_pinterest_white.png" width="20" style="margin-right: 20px;"></a>
<a href="https://www.youtube.com/channel/UCJGBaNOR3Y_ngsH4YoM-weg/featured?view_as=public/" target="_blank">
<img src="/images/icon_youtube_white.png" width="20" style="margin-right: 20px;"></a>
</div>
</div>
<!--<div class="widgetarea">-->
<!--</div>-->
<!-- Maps Widget End -->
<center>
<p class="footer-links">
<a target="_blank" href="/pdf/TERMS_OF_USE.pdf" style="font-size: 12px;">Terms of Use</a> |
<a target="_blank" href="/pdf/TXO-Privacy_Policy_Ver_1.0.1.pdf" style="font-size: 12px;">Privacy Policy</a> |
<a target="_blank" href="/pdf/Anti-Spam_Policy.pdf" style="font-size: 12px;">Anti-Spam Policy</a> |
<a target="_blank" href="/pdf/Electronic_Signature_Consent.pdf" style="font-size: 12px;">Electronic Signature Consent</a> |
<a target="_blank" href="/pdf/VR_NOTICE_TO_REPORT_USERS.pdf" style="font-size: 12px;">FCRA Agreement</a> |
<a target="_blank" href="/pdf/ThanksOffice.com_FAQ_Ver1.2.pdf" style="font-size: 12px;">FAQ</a> |
</p>
<p><span style="color: #fff;">© <%=DateTime.Now.Year%> TMPOS Inc. All rights reserved. <br />Powered by ESolutionTG</span></p>
<!--</div>-->
</div>
</div>
Set footer {position: absolute}
It sets your footer out of the html elements flow and the width of the body doesn't effect it.
I'm not sure the exact effect you are trying to achieve, but maybe try adding width: 100%; text-align: center; and remove margin-left: 22% in .footer-body
It looks like you didn't close <center> tag:
<!-- Maps Widget End -->
<center>
I assume that "<%-- --%>" is part of your template engine, but I removed them (not the HTML tags inside) and tried it on codepen and it works.
Plus what Ercan Peker suggested if you have fixed <body> width.
Like others have suggested, you can use position property to take the footer element out of any contained parent.
footer {
position: absolute;
left: 0;
bottom: 0;
width: 100vw; /* Make your footer span across the entire viewport */
}
I can't click on my links anywhere. They are not inside of the div that seems to be blocking my ability to click on them. They are also not supposed to be opaque because they are not inside of that div. They are in their own divs. Anyone see what I'm missing here? How do I change this so that I can click on my links again? I was messing with the background image for awhile. I just don't know what's going on. This is my cheezy website I'm making for school. I just need help so I can turn this in! Thank you!
<!DOCTYPE html>
<!--
LOCAL PAGE
Heather M Smith
My First Home Page
CSIS 1430
6/18/2017
-->
<html>
<head>
<title>Heather's Home Page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body
{
max-height: 100%;
margin: 0 auto;
}
#background{
background: #373737 url('pinkBackground.jpg') no-repeat;
min-height: 100%;
min-width: 1024px;
width: 100%;
height: auto;
position: fixed;
top: 0;
left: 0;
z-index: -3;
}
#heading
{
text-align: center;
}
#emailAddressLink
{
color: white;
}
#topBox
{
margin-top: 50px;
}
h1, h2, h3, h4
{
color: black;
font-family: Georgia;
text-shadow: 1px 0px 5px white;
text-align: center;
z-index: 4;
}
ol, ul, li
{
color: black;
font-family: Georgia;
font-size: 20px;
line-height: 2em;
z-index: 4;
}
.bigText
{
color: #373737;
font-family: Georgia;
font-size: 60px;
}
.link
{
color: #5200cc;
text-decoration: none;
font-family: Georgia;
font-size: 25px;
word-spacing: 5px;
line-height: 2em;
font-weight: bold;
text-shadow: 2px 0px 10px #ffff99;
z-index: 4;
}
.box
{
background-color: #DCD0C0;
padding: 20px;
border: 2px solid #373737;
margin: 10px auto;
width: 800px;
height: 300px;
opacity: .3;
z-index: -3;
}
.boxContents
{
width: 800px;
height: 340px;
margin: 10px auto;
margin-top: -350px;
text-align: left;
line-height: 2em;
z-index: 4;
}
#intro
{
font-family: Georgia;
font-size: medium;
word-wrap: normal;
font-size: 1.5em;
}
#slccLogo
{
position: relative;
float: right;
padding: 30px;
width: 250px;
height: 250px;
}
#owlImage
{
float: right;
width: 300px;
height: 200px;
}
#lastBox
{
line-height: 6em;
}
</style>
</head>
<body>
<!--BACKGROUND-->
<div id="background"></div>
<!--HEADING-->
<div id="heading">
<h1 class='bigText'>Heather's Home Page</h1>
<h2>CSIS 1430 | Email me:</h2>
<!--EMAIL ADDRESS-->
<address>
<a class='link' id="emailAddressLink"
href="mailto:HeatherSmithx#gmail.com" target="_blank">
Heather's Email
</a>
</address>
</div>
<br>
<!--BACKGROUND DIV BOX-->
<div class='box' id="topBox"></div>
<!--INTRO-->
<div class="boxContents">
<span id="intro">Hello! I'm Heather, a student at
<a class='link' href="http://www.slcc.edu/">Salt Lake Community
College</a>
studying Computer Science. I want to be a software developer and
my goal
is to get an internship before I graduate. I'm getting some
experience at
Century Link, where I currently work. I have worked at Century
Link for
two years as a Repair Representative. Even though my interest
in computers is great, I'm also an aspiring artist.
<br>
I've been painting, drawing, and playing music for most of my
life
and I know there's always so much more to learn. I'm hoping to
use my
creativity in a way that can be applied to developing software
in the
future.
</span>
</div>
<br>
<!--COMPUTER SCIENCE COURSES-->
<div class='box'></div>
<div class="boxContents">
<h2 class="heading">My Computer Science Courses at <a class='link'
href="http://www.slcc.edu/" target="_blank">SLCC</a></h2>
<img id="slccLogo" src="SLCCLogo.png" alt="SLCC">
<ul>
<li class="link"><a href =
"https://heathersmithx.wordpress.com/computer-science-and-information-
systems">CSIS 1030</a></li>
<li>CSIS 1340 - content coming soon</li>
<li>CSIS 1400 - content coming soon</li>
<li>CSIS 1410 - content coming soon</li>
<li>CSIS 1430 - content coming soon</li>
<li>CSIS 1550 - content coming soon</li>
</ul>
</div>
<br>
<!--GENERAL EDUCATION COURSES-->
<div class='box'></div>
<div class="boxContents">
<h2>My General Education Courses at <a class='link'
href="http://www.slcc.edu/" target="_blank">SLCC</a></h2>
<img id="owlImage" src="Owl.png" alt="Wise Owl">
<ul>
<li class="link"><a
href="https://heathersmithx.wordpress.com/coursework/english-2010/">ENGLISH
2010 NOTEBOOKS</a></li>
<li class="link"><a href =
"https://heathersmithx.wordpress.com/coursework/film-culture/686-2/">FILM
1070 FINAL PAPER</a></li>
<li class="link"><a href="index/reflection.html">CSIS 1430
REFLECTION</a></li>
<li class="link"><a
href="https://heathersmithx.wordpress.com/outside-the-classroom/">OUTSIDE OF
SCHOOL...</a></li>
</ul>
</div>
<br>
<!--MY FAVORITE WEBSITES-->
<div class='box'></div>
<div class="boxContents">
<h2>My Favorite Web Sites!</h2>
<ol>
<li class='link'><a href = "http://www.dreamincode.net/"
target="_blank">Dream in Code</a></li>
<li class='link'><a href = "https://www.wolframalpha.com/"
target="_blank">Wolfram Alpha</a></li>
<li class='link'><a href = "https://slcc.instructure.com/"
target="_blank">SLCC Canvas</a></li>
<li class='link'><a href = "https://www.w3schools.com/"
target="_blank">w3schools</a></li>
</ol>
</div>
<br>
<!--PROJECTS FROM THIS CLASS-->
<div class='box'></div>
<div class="boxContents" id="lastBox">
<h2>Projects from CSIS 1430</h2>
<h4 class="link">
<a class='link' href='resume.html' target="_blank">RESUME | </a>
<a class='link' href='littleBoxes/littleBoxes.html'
target="_blank">LITTLE BOXES | </a>
<a class="link" href='map/utahMap.html' target='blank'>IMAGE MAP
|</a>
<a class="link" href='PizzaPlace/pizzaIndex.html'
target='blank'>PIZZA ORDER FORM |</a>
<a class='link' href='GuessingGame/GuessIndex.html'
target="_blank">GUESSING GAME | </a>
<a class='link' href='TicTacToe/TicTacToe.html'
target="_blank">TIC TAC TOE | </a>
<a class='link' href='index/reflection.html'
target="_blank">REFLECTION </a>
</h4>
</div>
</body>
</html>
The issue is with the .boxContents class. The margin-top selector is pulling everything off. If you remove it, your links should function as expected. Also, just on a side-note, it's worth avoiding using lots of z-indexes in your CSS if they aren't required. It can lead to issues and content being hidden all too easily.
You've got a lot of z-index action going on there. I would be careful about how you are using the z-index. Refer to this great article on the CSS z-index which also higlights some of the pitfalls of using z-index. https://philipwalton.com/articles/what-no-one-told-you-about-z-index/
Change the class .link to have z-index:5; and then test it. It will put it in front of your other <divs>.
Just make sure you keep that class with a higher z-index than your other classes / IDs.
Here is my jsfiddle link: http://jsfiddle.net/m9tk4uex/
The first column is not looking properly, it is something margin-down.
<div class="wrapper">
<h1 class="collection-title">3 Easy Liquid Rubber Solutions For Your Customers</h1>
<div class="main">
<div class="column-1">
<h3>Leaky Barn Roofs</h3>
<img src="leaky-barn-roofs.jpg" alt="" />
<p>Liquid Rubber MetalSafe ...</p>
<img src="img1.jpg" alt="" />
</div>
<div class="column-2">
<h3>Waterproof Planter</h3>
<img src="waterproof-planter.jpg" alt="" />
<p>Simple and easy to do...</p>
<img src="img2.jpg" alt="" />
</div>
<div class="column">
<h3>RV Roof Repair Boxes</h3>
<img src="rv-roof-repair-boxes.jpg" alt="" />
<p>You may be surprised...</p>
<img src="img3.jpg" alt="" />
</div>
</div>
</div>
I need something like this http://s23.postimg.org/xghd34xbf/Untitled_1_copy.png
May i know how to fix this? and how to add border right to each column?
Thanks.
One solution is to add display: inline-block to all div inside div with class .main:
div.main > div {
display: inline-block;
}
Additional you can add min-height to p elements to align properly:
div.main div[class^=column] p {
min-height: 170px;
}
body {
background-color: #222222;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #fff;
}
.wrapper {
width: 960px;
margin-left: auto;
}
#header {
position: relative;
letter-spacing: 1px;
height: 148px;
padding-top: 19px;
padding-bottom: 0px;
background: url("//cdn.shopify.com/s/files/1/0334/3241/t/3/assets/header-bg.png?7423127476356136057") no-repeat scroll 0% 0% transparent;
}
#cart-login {
float: right;
}
.cart-elem {
display: block;
font-size: 24px;
color: #fff;
margin: 0px;
position: relative;
top: 5px;
}
.main {
-webkit-column-count: 3;
/* Chrome, Safari, Opera */
-moz-column-count: 3;
/* Firefox */
column-count: 3;
}
.collection-title {
color: #C5C5C5;
font-size: 28px;
line-height: 28px;
margin: 15px 0px 16px;
font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 400;
padding-bottom: 20px;
}
div.main > div {
display: inline-block;
}
div.main div[class^=column] p {
min-height: 170px;
}
<div class="wrapper">
<h1 class="collection-title">3 Easy Liquid Rubber Solutions For Your Customers</h1>
<div class="main">
<div class="column-1">
<h3>Leaky Barn Roofs</h3>
<img src="http://s2.postimg.org/4zex34qw5/leaky_barn_roofs.jpg" alt="" />
<p>Liquid Rubber MetalSafe Sealants provide corrosion protection, waterproofing and color restoration to aged rusting steel barn roofs, outlastingtypical barn roof paints for years. Our self priming coatings require only a washed surface without the
removal of any rust and can be applied with a brush, roller or paint sprayer. Standard & custom color top-coats are available.</p>
<img src="http://s17.postimg.org/3uwizx25r/img1.jpg" alt="" />
</div>
<div class="column-2">
<h3>Waterproof Planter</h3>
<img src="http://s2.postimg.org/4zex34qw5/leaky_barn_roofs.jpg" alt="" />
<p>Simple and easy to do. Waterproof and preserve your wood planter boxes. Untreated wood planter boxes start to decay from the harmful effects of water and ultraviolet light. Two thick coats of Liquid Rubber Waterproof Sealant will provide long lasting
and full protection that will secure your planter boxes for years to come.</p>
<img src="http://s17.postimg.org/3uwizx25r/img1.jpg" alt="" />
</div>
<div class="column">
<h3>RV Roof Repair Boxes</h3>
<img src="http://s2.postimg.org/4zex34qw5/leaky_barn_roofs.jpg" alt="" />
<p>You may be surprised at how inexpensive and simple it can be to repair an RV, motor home or camper yourself. Using a combination of Liquid Rubber Smooth Sealant and Liquid Rubber Seam Tape, any do-it-yourself customer can seal a leaky roof, whether
it's made of EPDM, TPO, fiberglass or aluminum.</p>
<img src="http://s17.postimg.org/3uwizx25r/img1.jpg" alt="" />
</div>
</div>
</div>
.main div h3:nth-child(1){margin-top: 0;}
Please update this code
body {
background-color:#222222;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
color:#fff;
}
.wrapper {
width:960px;
margin-left:auto;
}
#header {
position: relative;
letter-spacing: 1px;
height: 148px;
padding-bottom: 0px;
background: url("//cdn.shopify.com/s/files/1/0334/3241/t/3/assets/header-bg.png?7423127476356136057") no-repeat scroll 0% 0% transparent;
}
#cart-login {
float: right;
}
.cart-elem {
display: block;
font-size: 24px;
color: #fff;
margin: 0px;
position: relative;
top: 5px;
}
.main {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
-webkit-column-rule: 4px outset #ff00ff; /* Chrome, Safari, Opera */
-moz-column-rule: 4px outset #ff00ff; /* Firefox */
column-rule: 4px outset #ff00ff;
}
.collection-title {
color: #C5C5C5;
font-size: 28px;
line-height: 28px;
margin: 15px 0px 16px;
font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif;
font-weight: 400;
padding-bottom: 20px;
}
h3{margin: 0 0 10px;}
<div class="wrapper">
<h1 class="collection-title">3 Easy Liquid Rubber Solutions For Your Customers</h1>
<div class="main">
<div class="column-1">
<h3>Leaky Barn Roofs</h3>
<img src="http://s2.postimg.org/4zex34qw5/leaky_barn_roofs.jpg" alt="" />
<p>Liquid Rubber MetalSafe Sealants provide corrosion protection, waterproofing and color restoration to aged rusting steel barn roofs, outlastingtypical barn roof paints for years. Our self priming coatings require only a washed surface without the removal of any rust and can be applied with a brush, roller or paint sprayer. Standard & custom color top-coats are available.</p>
<img src="http://s17.postimg.org/3uwizx25r/img1.jpg" alt="" />
</div>
<div class="column-2">
<h3>Waterproof Planter</h3>
<img src="http://s2.postimg.org/4zex34qw5/leaky_barn_roofs.jpg" alt="" />
<p>Simple and easy to do. Waterproof and preserve your wood planter boxes. Untreated wood planter boxes start to decay from the harmful effects of water and ultraviolet light. Two thick coats of Liquid Rubber Waterproof Sealant will provide long lasting and full protection that will secure your planter boxes for years to come.</p>
<img src="http://s17.postimg.org/3uwizx25r/img1.jpg" alt="" />
</div>
<div class="column">
<h3>RV Roof Repair Boxes</h3>
<img src="http://s2.postimg.org/4zex34qw5/leaky_barn_roofs.jpg" alt="" />
<p>You may be surprised at how inexpensive and simple it can be to repair an RV, motor home or camper yourself. Using a combination of Liquid Rubber Smooth Sealant and Liquid Rubber Seam Tape, any do-it-yourself customer can seal a leaky roof, whether it's made of EPDM, TPO, fiberglass or aluminum.</p>
<img src="http://s17.postimg.org/3uwizx25r/img1.jpg" alt="" />
</div>
</div>
</div>
.column-1,.column-2,column{
-webkit-column-break-inside: auto;
}
I need to align image on left and text on right. I am using the following css.
body {} #slideshow-nav {
width: 700px;
height: 30px;
position: absolute;
z-index: 999;
bottom: 0;
left: 11px;
text-align: center;
text-decoration: none;
}
#slideshow-nav a {
background: transparent url('../Image/bullet_grey - 1.png') 0 0 no-repeat;
width: 26px;
height: 26px;
text-indent: -999px;
display: inline-block;
text-decoration: none;
margin: 7px;
text-indent: -9999px !important;
margin: 7px;
text-decoration: none;
background-position: center;
border: none;
outline: none;
}
#slideshow-nav a.activeSlide {
background-position: 0 -1000px;
background: transparent url('../Image/bullet_red.png') 0 0 no-repeat;
display: inline-block;
background-position: center;
text-decoration: none;
border: none;
outline: none;
}
.page-slideshow {
position: relative;
margin-bottom: 15px;
text-decoration: none;
background: #d4ecef;
}
.page-slideshow.narrow #slideshow-nav {
width: 460px;
left: 0;
text-decoration: none;
}
.di-hero {
background: transparent;
width: 718px;
height: 300px;
background-position: 11px 0;
background-repeat: no-repeat;
}
p.more {
margin: 8px 0 0 0;
float: right;
overflow: hidden;
color: #BC1E04;
text-decoration: none;
color: #bc1e04;
margin: 5px 0 0 0;
text-align: center;
float: right;
}
h3 {
display: block;
color: #514c44;
font: 18px/24px Georgia, "Times New Roman", Palatino, "Palatino Linotype", "Book Antiqua", serif;
margin: 0 0 10px 0;
float: right;
overflow: hidden;
text-decoration: none;
margin: 5px 0 0 0;
text-align: center;
float: right;
}
div.slide-content img {
margin: 0 20px 0 0;
border: 5px solid #5999a2;
}
p {
color: #2e2e2a;
margin: 0 0 10px 0;
float: right;
overflow: hidden;
text-decoration: none;
font: 12px/18px Helvetica, "Lucida Sans", "Trebuchet MS", Arial, Verdana, sans-serif;
text-align: center;
float: right;
}
p.more:hover {
text-decoration: underline;
}
.slide-content {
width: 718px;
height: 300px;
background-position: 11px 0;
background-repeat: no-repeat;
}
<div class="page-slideshow narrow">
<div class="hero di-hero">
<div>
<a href="" title="Delicious Ideas from AllRecipes.com">
<div class="slide-content">
<img src="" width="152" height="150" alt="Delicious Ideas from AllRecipes.com">
<h3>Delicious Ideas from AllRecipes.com</h3>
<p>BI-LO has teamed up with AllRecipes.com to provide enhanced recipe searches, regionally inspired recipes, ratings, videos and more.</p>
<p class="more">Find the perfect recipe</p>
</div>
</a>
</div>
<div>
<a href="" title="Meal Planning Made Simple">
<div class="slide-content">
<img src="." width="152" height="150" alt="Meal Planning Made Simple">
<h3>Meal Planning Made Simple</h3>
<p>Whether you're preparing a romantic valentine's dinner or having friends over to watch the big game, our meal planning guide can help.</p>
<p class="more">Start planning today</p>
</div>
</a>
</div>
<div>
<a href="" title="Improve Your Wine & Beer IQ">
<div class="slide-content">
<img src="" width="152" height="150">
<h3>Improve Your Wine & Beer IQ</h3>
<p>The right glass of wine or beer can turn a good meal into a great one. Let us help you take the mystery out of beer and wine shopping.</p>
<p class="more">Learn the basics of wine and beer</p>
</div>
</a>
</div>
<div>
<a href="" title="Learn How to Pick the Perfect Meat">
<div class="slide-content">
<img src="." width="152" height="150" alt="Learn How to Pick the Perfect Meat">
<h3>Learn How to Pick the Perfect Meat</h3>
<p>We’ve got all of the information you need to help you choose the right type of meat for your meal.</p>
<p class="more">See our meat and seafood guide</p>
</div>
</a>
</div>
</div>
<div id="slideshow-nav">
<div>
</div>
</div>
</div>
Now my image is on the Left and text on the right. But it is not properly aligned. I need text on the same line and on the right to the image. Which style element is missing ..? please help me.
Here is the fiddle link
just added following css
.imgDes {
margin-left: 180px;
overflow: hidden;
text-align: left;
}
.imgDes p {
text-align: right;
}
<div class="slide-content">
<img src="http://static.adzerk.net/Advertisers/fdec4733b4814d9e958b7f86c25020b5.jpg" width="152" height="150" alt="Delicious Ideas from AllRecipes.com">
<div class="imgDes">
<h3>Delicious Ideas from AllRecipes.com</h3>
<p>BI-LO has teamed up with AllRecipes.com to provide enhanced recipe searches, regionally inspired recipes, ratings, videos and more.</p>
<p class="more">Find the perfect recipe</p>
</div>
</div>
I'm not sure if this actually helps you but here is how I probably would have done it:
.container {
width:500px;
}
.imageclass {
float:left;
width:200px;
height:20px;
}
.textclass {
float:left;
width:300px;
height:20px;
}
<div class="container">
<p class="imageclass"><img src... /></p>
<p class="textclass">text...</p>
</div>
I used this exact code in one page I did, and it worked fine getting the paragraphs in the same line. You can probably change the paragraphs for divs, and you of course have to change the numbers so it fits on your page.
<table width="100%">
<tr>
<td align="left" valign="top">image</td>
<td align="left" valign="top">text</td>
</tr>
</table>
this way the text and the picture are in the same line
You could allways use tables in divs (Fiddle example here) like this:
<div class="page-slideshow narrow">
<div class="hero di-hero">
<div>
<a href="" title="Delicious Ideas from AllRecipes.com">
<div class="slide-content">
<table>
<tr>
<td>
<img src="" width="152" height="150" alt="Delicious Ideas from AllRecipes.com" style="float:left" >
</td>
<td>
<h3>Delicious Ideas from AllRecipes.com</h3>
<p>BI-LO has teamed up with AllRecipes.com to provide enhanced recipe searches, regionally inspired recipes, ratings, videos and more.</p>
<p class="more">Find the perfect recipe</p>
</td>
</tr>
</table>
</div>
</a>
</div>
<div>
<a href="" title="Meal Planning Made Simple">
<div class="slide-content">
<table>
<tr>
<td>
<img src="." width="152" height="150" alt="Meal Planning Made Simple" style="float:left">
</td>
<td>
<h3>Meal Planning Made Simple</h3>
<p>Whether you're preparing a romantic valentine's dinner or having friends over to watch the big game, our meal planning guide can help.</p>
<p class="more">Start planning today</p>
</td>
</tr>
</table>
</div>
</a>
</div>
<div>
<a href="" title="Improve Your Wine & Beer IQ">
<div class="slide-content">
<table>
<tr>
<td>
<img src="" width="152" height="150" style="float:left" >
</td>
<td>
<h3>Improve Your Wine & Beer IQ</h3>
<p>The right glass of wine or beer can turn a good meal into a great one. Let us help you take the mystery out of beer and wine shopping.</p>
<p class="more">Learn the basics of wine and beer</p>
</td>
</tr>
</table>
</div>
</a>
</div>
<div>
<a href="" title="Learn How to Pick the Perfect Meat">
<div class="slide-content">
<table>
<tr>
<td>
<img src="." width="152" height="150" alt="Learn How to Pick the Perfect Meat">
</td>
<td>
<h3>Learn How to Pick the Perfect Meat</h3>
<p>We’ve got all of the information you need to help you choose the right type of meat for your meal.</p>
<p class="more">See our meat and seafood guide</p>
</td>
</tr>
</table>
</div>
</a>
</div>
</div>
<div id="slideshow-nav">
<div>
</div>
</div>
</div>