asp.net - 在 div 底部对齐文本

标签 asp.net html css

这是我的 CSS

.FrontSlideShow
{   
   display:block; 
   overflow: none; 
   height: 323px;
   margin-bottom: 12px; 
   background-color:#005596; 
   background-image: url(/*edited*/); 
   background-repeat: repeat-x; width:754px; font-family:   verdana; font-size:large; 
   color:#FFFFFF; 
   clear:both; 
}

.FrontSlideShow .SlideShowImage
{
   float: left; 
   vertical-align:text-bottom; 
   padding-right: 24px;
}

.FrontSlideShow .SlideShowSubTitle
{ 
    vertical-align: text-bottom;
     margin-bottom: 10px;
}

这是标记

    <div class="FrontSlideShow">
      <div class="SlideShowMainTitle">
        <asp:Label ID="lblSlideTitle" runat="server"></asp:Label>
      </div>
      <div class="SlideShowImage">
        <asp:Image ID="imgSlide" runat="server" />
      </div>
      <div  class="SlideShowSubTitle">            
            <asp:Label ID="lblSlideDescription" runat="server"></asp:Label>           
      </div>
        <asp:Button ID="btnPrev" runat="server" Text="Prev" /><asp:Button ID="btnNext" runat="server" Text="Next" />
        <asp:SlideShowExtender ID="slExtender" runat="server" AutoPlay="true" Loop="true" PlayInterval="3000" TargetControlID="imgSlide" NextButtonID="btnNext" PreviousButtonID="btnPrev"
             ImageTitleLabelID="lblSlideTitle" ImageDescriptionLabelID="lblSlideDescription" SlideShowServiceMethod="GetSlides" SlideShowServicePath="~/WebServices/SlideShowService.asmx">
        </asp:SlideShowExtender>
        <asp:Literal ID="liMarkup" runat="server"></asp:Literal>
    </div>   

字幕div需要定位在父容器的右下角。有任何想法吗?但我能得到的只是: enter image description here

但我想要:enter image description here

最佳答案

试试这个:

.FrontSlideShow {
    position: relative;
}

.FrontSlideShow .SlideShowSubTitle {
    position: absolute;
    right : 20px;
    bottom: 20px;    
}

关于asp.net - 在 div 底部对齐文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5959031/

相关文章:

html - 如何在某些条件下限制访问页面?

html - 我需要编写什么 HTML 或 CSS 才能使用鼠标选择/突出显示占位符属性的文本?

javascript - 循环遍历数组以检查复选框

jQuery 动画 div : button disapears (z-index bug? )

css - 如何快速从整个文件中删除所有供应商前缀?

javascript - 结合用户滚动+动画css3/Javascript

c# - 如何刷新图像的浏览器缓存?

ASP.net 网站中的 C# 密码文本框

c# - 如何从存储过程填充数据表

asp.net - 我该如何解决这个陈述