2014-02-23 2 views
0
<!DOCTYPE html> 
<html> 
<head> 
<meta charset="UTF-8"> 
<title>php-login-advanced</title> 
<style type="text/css"> 
    <LINK href="style.css" rel="stylesheet" type="text/css"> 
    body { 
     font-family: Arial, sans-serif; 
     font-size: 12px; 
     margin: 10px; 
    } 
    label { 
     position: relative; 
     vertical-align: middle; 
     bottom: 1px; 
    } 
    input[type=text], 
    input[type=password], 
    input[type=submit], 
    input[type=email] { 
     display: block; 
     margin-bottom: 15px; 
    } 
    input[type=checkbox] { 
     margin-bottom: 15px; 
    } 
</style> 
</head> 
<body> 

<?php 
// show potential errors/feedback (from login object) 
if (isset($login)) { 
if ($login->errors) { 
    foreach ($login->errors as $error) { 
     echo $error; 
    } 
} 
if ($login->messages) { 
    foreach ($login->messages as $message) { 
     echo $message; 
    } 
} 
} 
?> 

<?php 
// show potential errors/feedback (from registration object) 
if (isset($registration)) { 
if ($registration->errors) { 
    foreach ($registration->errors as $error) { 
     echo $error; 
    } 
} 
if ($registration->messages) { 
    foreach ($registration->messages as $message) { 
     echo $message; 
    } 
} 
} 
?> 

모든 .php 페이지를 .html 페이지와 일치 시키려고합니다. 어떻게하면 .header.php가 .css와 함께 작동하는 데 문제가 있습니까?_header.php가 .css에 연결되지 않았습니다.

_footer.php에도 어떤 작업을해야합니까? 미리 감사드립니다. 내 웹 사이트 전체를 일치 시키려고.

답변

0

잘못된 HTML/CSS. <style> 블록 에 입력 한 내용은 유효한 CSS 여야합니다 (MUST). <link> 요소가 있는데 이는 css가 아닙니다.

그 방법 중 하나 여전히

<LINK href="style.css" rel="stylesheet" type="text/css"> 
<style type="text/css"> 
    ... blah blah blah... 
</style> 
+0

아니 didnt 한 일을보십시오. – user3335963

+0

"type = : text/css">가 두 번 있기 때문에 그럴 수 있습니까? 한 번 링크 아래에 한 번 있습니다. – user3335963

+0

유형을 몇 번이나 몇 번이나 사용할 수 있습니까? 위의 CSS는 스타일 블록 안에 HTML 링크 태그를 넣었 기 때문에 완전히 망가졌습니다. 그것은''와 같을 것입니다. html은 스크립트 블록 안에 javascript가 아니며 철저한 구문 오류가 있습니다. 예를 들어 링크 -in-css –

관련 문제