dongye9071 2015-09-15 20:33 采纳率: 0%
浏览 58

CSS样式是否从一个html5页面向下级联到另一个页面?

I'm quite new to HTML & CSS but currently facing a bit of a problem. I've two pages (one html5, one php), say page1.html and page2.php. Both pages have a jquery js and two css files(one for jquery, one for jquery mobile) attached to them. There is a hyper-link that can be used to navigate from page1 to page2. page2.php generates a table using data retrieved from a MYSQL table.

If page2 is loaded into a browser directly, it displays quite well and all the styles are applied as expected. However, all hell breaks loose, if page2 is navigated to from page1. In that instance, the table appear to loose all the styles and is not displayed correctly. As a matter of fact, looks quite horrible.

My thinking is that the two pages are independent of each other. Is it possible for some style settings in page1 to be responsible for this baffling situation. This is really driving me nuts.

By the way- I'm using Dreamweaver 6 as the IDE.

  • 写回答

1条回答 默认 最新

  • doucan1996 2015-09-29 18:49
    关注

    I found out that by simply moving the style link statements (shown below) in page2.php to just before the BODY closing tag, the problem disappears.

    <link href="table.css" rel="stylesheet" type="text/css">
    <link href="jquery.mobile-1.0b3/jquery.mobile-1.0b3.min.css"   rel="stylesheet" type="text/css">
    <script src="jquery.mobile-1.0b3/jquery-1.6.4.min.js" type="text/javascript"></script>
    
    <script src="jquery.mobile-1.0b3/jquery.mobile-1.0b3.min.js" type="text/javascript"></script>
    <link href="styles/f.css" rel="stylesheet" type="text/css">
    

    Can't understand why this is so but just too happy to get over this.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c