Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 286831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:40:18+00:00 2026-05-12T05:40:18+00:00

I have the following HTML code: <ul class=blogEntry> <li class=title section> <span><asp:Literal ID=litTitle runat=server

  • 0

I have the following HTML code:

<ul class="blogEntry">
    <li class="title section">
        <span><asp:Literal ID="litTitle" runat="server" /></span>
        <span class="date"><asp:Literal ID="litDate" runat="server" Text="10/1/1000" /></span>
    </li>
    <li class="body section"><asp:Literal ID="litBody" runat="server" /></li>
    <li class="tags section">
        <ul class="tags">
            <li class="tag">Tag 1</li>
            <li class="tag">Tag 2</li>
            <li class="tag">Tag 3</li>
        </ul>
    </li>
</ul>

And the following CSS code:

ul.blogEntry
{
    border: 1px solid black;
    border-bottom: 0px;
    padding: 0px;
}
ul.blogEntry li.section, ul.blogEntry li.lastsection
{
    list-style: none;
}
ul.blogEntry li.title
{
    background-color: #67A7FF;
    font-size: 14px;
    font-weight: bold;
}
ul.blogEntry li.title span
{
    display: inline;
}
ul.blogEntry li.title.section span.date
{
    float: right;
}
ul.blogEntry li.section
{
    padding: 4px;
    border-bottom: 1px solid black;
}

As is, the date will drop to a new line and float to the right. If I change the ul.blogEntry li.title span CSS and add float: left; The outer LI element’s height shrinks and the bottom border cuts right through the spans’ text. Advice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:40:19+00:00Added an answer on May 12, 2026 at 5:40 am

    Please don’t add any elements for clearing. Elements which only enable specific styling significantly breaks semantics and separation of concerns.

    The simple answer is to add overflow:auto; to the container element (i.e. li.title) but there are other ways:

    • http://www.positioniseverything.net/easyclearing.html
    • http://www.innovatingtomorrow.net/2008/03/24/how-clear-floats-css
    • http://www.sitepoint.com/blogs/2005/02/26/simple-clearing-of-floats/

    Clearing blocks are EVIL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 152k
  • Answers 152k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Ok, I figured it out. The difference is that the… May 12, 2026 at 10:05 am
  • Editorial Team
    Editorial Team added an answer I follow Jon Skeet and others on his blogroll Ian… May 12, 2026 at 10:05 am
  • Editorial Team
    Editorial Team added an answer Easiest way to find out would be to start writing… May 12, 2026 at 10:05 am

Related Questions

Hi guys wonder if you guys could help me I'm trying to compile a
I'm having an issue with rails involving javascript. Basically, I have the following code:
I have the following code in my site.master for a menu: <ul id=menu> <li><%=
I have the following code for creating tabs. It works at the end of
I have the following script in my homepage $(function () { // same as

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.