douguangxiang0363 2013-10-09 01:21
浏览 70

PHP CSS ::内联工作,但不是内部和外部样式表

I have created PHP files which accept data from $_GET method.

After that I use all the data I get to create HTML pages. Nothing is wrong with the data but in CSS I cannot style HTML elements. Except when it comes to inline styling, that works but it is not good to maintain.

I try to use like this but it doesn't work , Please Help

THANK IN ADVANCE

Example.php

<?php
$dataCover      = $_GET['dataCover'];
$dataTitle      = $_GET['dataTitle'];
$dataTag        = $_GET['dataTag'];
$dataDir        = $_GET['dataDir'];
$dataYear       = $_GET['dataYear'];
$dataCreated    = $_GET['dataCreated'];
$dataModified   = $_GET['dataModified'];
$userAUID       = $_GET['userAUID'];
$galleryID      = $_GET['galleryID'];
?>

<!DOCTYPE html>
<html>
<head>
    <title></title>

    <style type="text/css" media="all">
        #container img{
            height: 230px;
            width: 200px;
        }
        #container .center{
            display: block;
            margin: 0 auto;
        }
    </style>

    <script src="../lib/jquery-1.10.2.min.js"></script>
    <script src="../lib/jquery.mobile-1.3.1.min.js"></script>
    <script src="../lib/se.js"></script>
</head>

<body>


    <div data-role ="page" id ="page1">
        <div data-role ="header">
            <h1> header </h1>
        </div>

        <div data-role="content">
            <div id="container">
                <img class="center" src="<?echo $dataCover?>" alt=""/>
                <p id="title"><?echo $dataTitle;?></p>
                <p id="tag"><?echo $dataTag;?></p>
                <p id="created">Created : <?echo $dataCreated?></p>
                <p id="modified">modified : <?echo $dataModified?></p>
                <a href="http://54.249.251.55/AUgallery"  target="_blank" data-url="<? echo $dataCreated ?>" rel="external" data-role="button">View Ebook-Gallery</a>
                <a href="<?echo 'http://localhost/webAPP/php/addBookmark.php?userAUID='.$userAUID.'&noteID='.$galleryID?>"data-ajax="false" rel="external" data-role="button">Bookmark</a>
            </div>
        </div>
    </div>

</body>
</html>
  • 写回答

3条回答

  • dsx666666 2013-11-07 12:10
    关注

    When you move your css from inline to style sheet file, you have to refresh your page with Ctrl+F5. Maybe it's coming from the cache. Also you can assign your css to the image by jquery.

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料