WordPress.org

Ready to get started?Download WordPress

Forums

Newbie: No styling from remote machine (7 posts)

  1. vilogin
    Member
    Posted 9 years ago #

    Hi,
    I am playing with WordPress to see what it can do. I have installed WP 1.2, Apache 2.0.5.0, PHP 4.3.8 on WXP Pro on a two PC 192.168.x.x network.
    When I go to http://localhost/wpblog (this is where the WP directory is) I have the CSS styling. When I however try to connect from the remote PC with http://192.168.0.x/wpblog to the same PC, I get the data but no CSS styling is available.
    Can anybody shed some light on this situation.
    Thanks

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Check your path to the CSS ?
    If it's absolute, alter it to relative and vice versa ?

  3. vilogin
    Member
    Posted 9 years ago #

    Thanks,
    But being a newbie; Where do I check the path to the CSS?
    BTW, The same thing happens on the localhost when I use Virtual hosts.

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    When you see your blog in your browser - styled or not - select "View Source" from the browser menu.
    It will say something like this:
    <style type="text/css" media="screen">
    @import url( http://www.tamba2.org.uk/T2/wp-layout.css );
    </style>

    or
    <style type="text/css" media="screen">
    @import url( wp-layout.css );
    </style>

    The first is an absolute path, the second is a relative path.
    The absolute path is created by this line in index.php:
    <style type="text/css" media="screen">
    @import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
    </style>

    That's the norm.
    You can change it to
    <style type="text/css" media="screen">
    @import url(wp-layout.css );
    </style>

    to try a relative path.

  5. vilogin
    Member
    Posted 9 years ago #

    Thanks, this must be it.
    I tried it on the virual hosting side, and it worked. I will try it with the two PC setup when I'm at home later.

  6. TechGnome
    Moderator
    Posted 9 years ago #

    Podz - I'm having same issue w/ my test PC at home.... NOTHING works.... I've tried relative, I've tried absolute.... for some reason, some of the CSS just doesn't work - It's weird because I get all the text styling, but none of the images and none of the positioning.... The only thing I haven't tried is using it against localhost instead of the IP address...
    Tg

  7. vilogin
    Member
    Posted 9 years ago #

    Now it is OK!
    How it worked out: I created virtual hosts. I installed WordPress again (after deleting the old database, and creating a new one). I used the hosts file in both computers to point the respective PC's to each other's virtual hosts.
    Before I had moved the webroot after I had configured WordPress.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.