Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2012
    Posts
    12
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Header need help

    Hello, why header isn't in full width if browser is not in full size ? please some one help. Thanks.

    PHP Code:
    body {
        
    margin:0px;
    }
    .
    header {
        
    backgroundurl(images/header.pngrepeat-#fff;
        
    min-width:100% !important;
        
    height:268px;
        }
    .
    logo {
        
    height:60px;
        
    width:140px;

    PHP Code:
    <html>
    <
    head>
    <
    link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
    </
    head>
    <
    body>
    <
    div class="header">
    <
    div class='tekstas'>Sveiki atvike i <a href='index.php'>androidos.lt</apuslapi</div>
    <
    div class='logo'><img src='images/logo.png' alt='Logo'></img></div>
    </
    div>
    </
    body>
    </
    html

  • #2
    Regular Coder
    Join Date
    Jul 2012
    Location
    London
    Posts
    473
    Thanks
    4
    Thanked 86 Times in 86 Posts
    Is your website live? may I have a link

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello aiva286,
    You don't say what browser you're seeing this issue in. You also don't have a DocType in the snippet you've posted...

    See the links about DocTypes and Validation in my signature line below. They can all help you.

    A 100% min-width is kind of pointless. Maybe just setting the width makes more sense?

    Look at it this way -
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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">
    html, body {
    	margin: 0;
    	background: #fc6;
    }
    .header {
    	height: 268px;
    	width: 100% ;
    	background: url(images/header.png) repeat-x #fff;
    }
    .logo {
    	height: 60px;
    	width: 140px;
    }
    </style>
    </head>
    <body>
        <div class="header">
            <div class='tekstas'>Sveiki atvike i <a href='index.php'>androidos.lt</a> puslapi</div>
            <img src='images/logo.png' alt='Logo' class="logo" />
        </div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •