Background-color puzzle on CSS for heading/title div.
Posted
by ProfK
on Stack Overflow
See other posts from Stack Overflow
or by ProfK
Published on 2010-05-07T17:55:59Z
Indexed on
2010/05/07
17:58 UTC
Read the original article
Hit count: 514
web-development
|css
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>
© Stack Overflow or respective owner