Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS positioning issues: invalid property value

I have some very simple HTML/CSS code, and no matter what I do, I always get an "invalid property value" exception by chrome, and the logo won't position properly.

Fixed the first problem, but now the image does not move related to the border.

<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>my website</title>
    <style type="text/css">

        *{ padding: 0; margin: 0; }

        .header {
            width: 100%;
            height: 100px;
            border: none;
            border-bottom-style: solid;
            border-bottom-width: 5px;
            position: relative;
            border-bottom-color: rgb(220,30,60);
        }

        .logo {          
            position: absolute;
            padding-bottom:50px;
            height: 150%;
            width: auto;                
        }    
      
    </style>        
</head>

<body>
    <div class="header" id="header">
        <img id="logo" class="logo"  src="image.png"/>
    </div>
</body>
</html>
like image 779
tagduck Avatar asked Nov 08 '16 14:11

tagduck


2 Answers

I had a similar issue for me.

I wrote 10 (instead of 10px), this fixed the issue.

like image 79
Manohar Reddy Poreddy Avatar answered Sep 19 '22 12:09

Manohar Reddy Poreddy


I just don't understand why you used padding-bottom instead of bottom in this case. Anyway:

   <html lang="de" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="utf-8" />
        <title>my website</title>
        <style type="text/css">
             *{ padding: 0; margin: 0; } 
            .header {
                position: relative;
                height: 100px;
                border-bottom: 5px solid rgb(220,30,60);
            }
            .logo {
                position: absolute;
                bottom:50px;
                height: 150%;
                width: auto;
            }
        </style>
    </head>
    <body>
     <div class="header" id="header">
        <img id="logo" class="logo"  src="image.png"/>
     </div>
    </body>
    </html>

CSS bottom property: http://www.w3schools.com/cssref/pr_pos_bottom.asp

CSS padding-bottom property: http://www.w3schools.com/cssref/pr_padding-bottom.asp

like image 21
Vixed Avatar answered Sep 16 '22 12:09

Vixed