Division background colour not showing behind text element
I am trying to program a website and am now unable to get the division background to display behind a text element. You can see what I mean by clicking here.
<div id="main-back"><div id="main-box"><h3>About the author - Tony Webb, About the author - Tony Webb, About the author - Tony Webb</h3><div id="texted-1"><p><img src="http://www.what-do-christians-believe.co.uk/wpimages/a-webb-photo.jpeg" alt="Photo of Tony Webb" /></div></div></div><div id="foot-menu">
Can you tell me what code I need to use to include the background behind the text box (#fffff0)?
<div id="main-back" style="margin-top: 1.25em"> // style not working either
<div id="main-box"><h3>About the author - Tony Webb, About the author - Tony Webb, About the author - Tony Webb</h3><div id="texted-1"><p><img src="http://www.what-do-christians-believe.co.uk/wpimages/a-webb-photo.jpeg" alt="Photo of Tony Webb" /></div></div></div>
You can see all the html code by clicking source from here
Both sets of code pass w3c validation.
I do have a problem with an image not displaying. I've posted another thread on this but not got an asnwer that works. It seems that the division isn't being read.
I was driving myself CRAZZZZzzzzzzyyyyyyyYYYY until realizing had copied WRONG <style> comment. Slashes work in JavaScript to end of line, but only /*comment*/ within CSS is slash-asterisk-asterislk-slash.
Anyway, here's some code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
#main-back { width: 80%; overflow: auto; background-color: #fffff0; margin: 10px auto; padding: 40px;} /* Not showing */
#main-box {float: left; background-color:red;
padding: 40px; margin: 10px;
border: #D5D6FF 4px outset;
text-align: left;
font-family: arial,san-serif;
font-size: 1.25em;
color: black;
}
#main-box h3 {padding: 10px; }
#main-box img {float:left; padding: 0 5px; margin; 5px; }
#texted-1 img { float:left; padding: 0 5px;}
#texted-1 p {padding: 0 5px; }
#texted-1 {background-color:#FFFFFF;
overflow: auto;
padding: 10px; margin: 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 1.00em;
color: black;
}
</style>
</head>
<body>
<div id="main-back">
<div id="main-box">
<h3>About the author - Tony Webb, About the author - Tony Weoverflow: auto:bb, About the author - Tony Webb</h3>
<div id="texted-1">
<img src="http://www.what-do-christians-believe.co.uk/wpimages/a-webb-photo.jpeg" alt="Photo of Tony Webb" /><p>About the author - Tony Webb</p>
</div>
</div>
</div><!--closeMAIN-BACK-->
</body>
</html>
Bookmarks