WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Body is not showing up correctly (5 posts)

  1. MaddTechWF
    Member
    Posted 2 years ago #

    I'm trying to get my header to show up correctly. I have the following code setup in my style.css and index.html file.

    CSS

    @charset "utf-8";
    /* CSS Document */
    
    body {
    	/* background: url('../images/header.png') x-repeat; */
    	background-color: #c8c8c8;
    	background-image: url('../images/header.png');
    	background-repeat: repeat-x
    }
    
    /* HEADER SECTION */
    .header{
    	height: 110px;
    	width: 100%;
    }
    
    .logo {
    	background-image: url('../images/logo.png');
    	float: left;
    	height: 110px;
    	width: 247px;
    }

    HTML

    <!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>Default Page</title>
    		<link rel="stylesheet" type="text/css" href="style.css"/>
    	</head>
    	<body>
        	<div class="container_12">
            	<div class="header">
            		<div class="logo"></div>
                </div>
            </div>
    	</body>
    </html>

    When I preview this code, the "BODY" is padded down from the top of the page. Why is this?

  2. MaddTechWF
    Member
    Posted 2 years ago #

    /*Container
    ----------------------------------------------------------------------------------------------------*/
    
    .container_12 {
      margin-right: auto;
      margin-left: auto;
      width: 960px;
    }

    This is from my 960.css file.

  3. Code helps very little; post the URL.

  4. MaddTechWF
    Member
    Posted 2 years ago #

    It's not live. I'm coding it on my local server.

    What I Want...
    What It's Doing...

  5. MaddTechWF
    Member
    Posted 2 years ago #

    I got it working. Had to add a margin-top: -8px to my logo. Sorry to bug anyone.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.