Somebody knows why CSS doesn´t work without IFrame?

Discussion in 'CSS' started by cesarwj, Jan 6, 2012.

  1. #1
    Hi ,


    My index.HTML(At wwww) has a iframe that is used just to call loja-virtual.html file in another directory and it´s ok, but I don´t want to use Iframe because it´s bad to SEO.


    I change the index.HTML by index.PHP then the last CSS files below doesn´t work in the called page loja-virtual.html:


    <link rel="stylesheet" href="http://localhost/estrategia-global/css/reset.css" type="text/css" media="all">
    <link rel="stylesheet" href="http://localhost/estrategia-global/css/grid.css" type="text/css" media="all">
    <link rel="stylesheet" href="http://localhost/estrategia-global/css/style.css" type="text/css" media="all">


    Don´t WORK: <link rel="stylesheet" href="http://localhost/estrategia-global/ext/960gs/960_24_col.css" type="text/css" media="screen">


    PS: Whe I use (<meta http-equiv="refresh" content="3;URL=http://localhost/homepage/loja-virtual.html" />) in loja-virtual.html the last CSS works.


    Code of index.PHP (include("estrategia-global/loja-virtual-completa.html")


    What is happen?


    tks,
    Cesar.
     
    cesarwj, Jan 6, 2012 IP
  2. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #2
    Firstly iFrames are being read by Google and some of the other search engines so using them doesn't have to affect your SEO.

    why is the CSS file that isn't working in a separate file? Is this so that the iFrame content is altogether?

    Changing the index.html to index.php won't have affected this. But I don't get what you are trying to do with your explanation and code
     
    Toycel, Jan 9, 2012 IP
  3. cesarwj

    cesarwj Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    tks Toycel by answear me...

    I read by google doc that Google doesn´t index well Iframe to do a execellent SEO.

    If u have a better sugestion to call my homepage by index.HTML, please give me.

    Explanation:

    My index.HTML in www directory exist just to call another files HTML (my homepage) that are in another directories (www\estrategia-global).

    The index.HTML has just a IFrame to call all my pages in www\estrategia-global and the CSS works fine. Then, all my pages are under this IFrame

    I don´t want to use IFrame because the Google doesn´t index it well and I´d like to change by PHP or other command.

    When I change the file index.HTML (with Iframe) by index.PHP (with include command) to call all my homepage (in www\estrategia-global), one CSS file doesn´t work. Each HTML file from my homepages has 4 calls to 4 CSS files and just one don´t work with index.PHP. It doesn´t happen with IFrame in index.HTML

    When I use the index.PHP and add the line (<meta http-equiv="refresh" content="URL=http://localhost/estrategia-global/loja-virtual-completa.html" />) in each HTML files from my homepage all works fine. But, its a wrong way and I don´t want to continue with it.

    PS: I add media="all" to loja-virtual-completa.html and the same CSS above continue with error.

    CODE Index.PHP:
    <html>
    <body>
    <? php include("/estrategia-global/loja-virtual-completa.html"); ?>
    </body>
    </html>

    CODE Index.HTML:
    <html>
    <head>
    <title>
    Estrat&eacute;gia Global
    </title>
    </head>
    <frameset rows="100%" border=0>
    <frame name="site" src="/estrategia-global/loja-virtual-completa.html" />
    </frameset>
    </html>


    CODE from /estrategia-global/loja-virtual-completa.html is Attached.

    Do u know why the CSS doesn´t work?

    Tks.
     

    Attached Files:

    cesarwj, Jan 9, 2012 IP