My current issue is as follows:
https://i.sstatic.net/ab08J.png
The problem I am encountering is that the "Install Now" button is overlapping with the text above it, rather than being aligned with the WWW.DOMAIN.COM element.
Below is the corresponding HTML code:
<div id="facebook_ad_description_wrapper">
<div id="facebook_ad_headline">
Headline
</div>
<div id="facebook_ad_description">
This app is the new mobile app that will change the way you see the world.
</div>
<div>
<div id="facebook_ad_url">
WWW.DOMAIN.COM
</div>
<div id="facebook_ad_cta">
Install Now
</div>
</div>
</div>
Additionally, here is the associated CSS:
#facebook_ad_description_wrapper {
margin-top: -2px;
}
#facebook_ad_image {
overflow: hidden;
width: 464px;
height: 246px;
margin-left: 1px;
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
background-color: transparent;
border-bottom: 1px #c4c4c4 solid;
}
#facebook_ad_headline {
font-family: 'Georgia';
color: #000000;
font-size: 18px;
font-weight: 500;
padding: 5px 10px 5px 10px;
}
#facebook_ad_description {
font-family: 'helvetica';
color: #000000;
font-size: 12px;
line-height: 16px;
max-height: 80px;
padding: 0px 10px 5px 10px;
}
#facebook_ad_url {
padding: 5px 10px 10px 10px;
font-size: 11px;
line-height: 11px;
color: #9197a3;
}
#facebook_ad_cta {
font-family: 'helvetica';
background-color: #f6f7f8;
float: right;
margin: -40px 10px 10px 10px;
padding: 4px 8px;
border: 1px solid;
border-radius: 2px;
border-color: #cccccc #c5c6c8 #b6b7b9;
color: #4e5665;
font-size: 12px;
font-weight: bold;
text-shadow: 0 1px 0 #fff;
}
Due to the varying length of the text "This app is the new mobile app that will change the way you see the world," I am in need of a flexible solution that will consistently keep both the WWW.DOMAIN.COM and the "Install Now" button on the same line, below the text above them.
I have attempted to use clearfix
, overflow
, and display:inline-block
but have not been able to resolve this layout issue. How can I address this problem?