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 780837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:08:16+00:00 2026-05-14T20:08:16+00:00

I have the following title div setup, but when only the leftmost div has

  • 0

I have the following title div setup, but when only the leftmost div has content, the red background for the title is not applied. Why is this, as the ‘title’ div has content, and its background should be red.

Head stuff:

<title>Into the Breech</title>
<link href="Styles/Reset.css" rel="stylesheet" type="text/css" />
<style type="text/css">
    body { font-family: Arial, Sans-Serif, System; }        
    #title { background-color: #F71831; font-weight: bold; }                    
    .title-segment-left { float: left; }
</style>

Body stuff:

<div id="title">
    <div id="menu-title" class="title-segment-left" style="width: 200px;">
        Menu
    </div>
   <div id="main-title" class="title-segment-left" style="width: auto;">
        Home Page
    </div>
    <div id="right-title" style="float: right;">
        Provantage Media Management System
    </div>
</div>
  • 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-14T20:08:16+00:00Added an answer on May 14, 2026 at 8:08 pm

    When an element is floated (like your .title-segment-left), it’s parent’s layout does not account for the floated element. That’s causing your #title to collapse to 0x0 when it has no other content than the floated element. Since it’s 0x0, the background doesn’t show.

    Here’s a tutorial on floats that might be helpful.

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

Sidebar

Related Questions

I have the following markup: <div class=FixedHeightContainer> <h2>Title</h2> <div class=Content> ..blah blah blah... </div>
I have one JSON file like following: {entries:[{title:‘foo’,id:‘01’,created:‘2010-12-06’},{title:‘bar’,id:‘02’,created:‘2010-12-05’}]} And also I have one html
I have the following snippet of code (see below) and want to make the
I have the following code which should change the value of an h2 from
I have the following css .container {margin-left:auto; margin-right:auto; width:1020px;} .body {float:left; width:1020px;} .leftcont {float:left;
I have the following code where I declare a PHP array variable and inside
I have the following code: <!DOCTYPE html> <html> <head> <script src=http://code.jquery.com/jquery-latest.min.js></script> <meta name=viewport content=initial-scale=1.0,
Using the following model, I expect that when the Submit button is hit, the
I have a REST API that I am trying to access using Rails 3.0.1
Ok so I have a database that I am searching for business results. I

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.