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.

    评论

报告相同问题?

悬赏问题

  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮