Why won't the border go around the text? I use Firefox. See jpg. file attachment. Thanks. <!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" /> <link rel="stylesheet" type="text/css" media="screen" href="facts02.css" > <title>Just the facts</title> </head> <html> <body> <div id="facts"> <p>These are just the facts</p> </div><! -- facts --> </body> </html> CSS body {font-family:"Trebuchet MS", Verdana, sans-serif; background: rgb(120,130,140);} #facts { background: rgb(155,145,45); border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-left: 1px solid #000000; width: 400px; height: 20px; float: left;}
Probably the P element has some margin. Try without P and try also to set height:auto to the div element