Reputation: 165
I'm trying to get my text properly aligned. However, it's not expanding when there's a long caption or description. Below is what I have..
Screenshot:
"The Forum" is fine, but "Subscribe Today!" isn't staying on one line like "The Forum." It happens when there's long text. Also, same thing for the description.
HTML:
<div class="hotcampaign-container">
<a href="' . $item['url'] . '">
<div id="campaigns_image">
<img src="' . $item['image_url'] . '" align="left" alt="' . $item['caption'] . '" />
</a> </div>
<div id="campaigns_caption">' . $item['caption'] . '</div>
<div id="campaigns_desc">' . $item['desc'] . '</div>
<div id="campaigns_link">
<a href="' . $item['url'] . '">
<div align="right">More Info »</div>
</a>
</p>
</div>
<br />
</div>
Div ID's CSS:
#campaigns_image {
padding: 0px 10px 10px;
}
#campaigns_caption {
padding: 0px 177px 0px;
font-weight: bold;
}
#campaigns_desc {
padding: 0px 177px 0px;
}
#campaigns_link {
padding: 0px 10px 0px;
}
Upvotes: 2
Views: 1209
Reputation: 56539
#campaigns_caption {
padding: 0px 177px 0px;
font-weight: bold;
white-space: nowrap;
}
Upvotes: 0
Reputation: 4648
Try
#campaigns_caption{
padding: 0px 177px 0px;
font-weight: bold;
width:auto;
min-width:300px;//some px according to te scenario
}
Upvotes: 1
Reputation: 442
Try to remove the padding right to your css of the #campgaigns_caption
div:
#campaigns_caption {
padding: 0px 0px 0px;
font-weight: bold;
}
Upvotes: 0
Reputation: 15779
Add a whitespace:nowrap;
for the class
or id
of the <div>
that renders "Subscribe today" text.
Upvotes: 0