Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

layout.css

Contributor ,
Apr 06, 2007 Apr 06, 2007

Copy link to clipboard

Copied

hey guys, i am having a major problem getting my layout to work on a script, i uploaded the file to "includes" and made sure is here:

LINE 19 - <title><?php echo $page_title; ?></title>
LINE 20 - <style type="text/css" media="screen">@import "./includes/layout.css";</style>
LINE 21 - </head>

But still doesn't work, here is the page :
http://therainbowpride.com/myphp2/index.php
If someone can help me getting this to work i would be very thankfull, thank you.

WARNING :::: do NOT go to my website, it is an adult website and i don't want to upset nobody.
Thank you
TOPICS
Server side applications

Views

432
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 06, 2007 Apr 06, 2007

Copy link to clipboard

Copied

this is the name of the scripts that work all together:

config.inc.php
index.php
mysql_connect.php
layout.css
header.html
footer,html

i checked all one by one many many times, ans tested one by one separately.
I dont understand why doesn't the layout.css work in it.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 07, 2007 Apr 07, 2007

Copy link to clipboard

Copied

I am just learning php, but I have been using css to design web sites for a while. So, for what's it worth (and since no one else has responded yet), here's my advice:

What you need to do is to create a php page and link it to a stylesheet. Let's say your styles are listed in a css file named "mainstyles" and in a folder named "styles." You can either link it to your php file:

<link href="styles/mainstyles.css" rel="stylesheet" type="text/css" media="screen" />

or import it:

<style type="text/css" media="screen">
@import url("styles/mainstyles.css");
</style>

That's all you need, except it's a good idea to include the following code to compensate for IE5's rendering of css (just add it beneath the linked or imported stylesheet code):

<!--[if IE 5]>
<style>
body {text-align: center;}
#wrapper {text-align: left;}
#nav a {width: 146px;}
</style>
<![endif]-->

Now, name your file something like mainstyles.php.

Now, add the following code to your php pages that you want styled with the mainstyles:


<?php
include('folder/mainstyles.php');
?>

Of course, replace the word "folder" with the name of the folder that contains this file. You would write this code in the head section.

You tried to use html style tags to import your php file. You need to remember that anything between php tags (<?php ?>) will be interpreted by the web browser as php code. Any thing outside those tags will be interpreted as html.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 07, 2007 Apr 07, 2007

Copy link to clipboard

Copied

Thank you MValentine for the reply, comes to find out that the layout given in this chapter'13' has nothing to do with the script from the book itself" i think larry ullman should think of other with less experience in css"
I need to learn how to create layout to fit my pages'script'. At least the basic. Is it that diff to create layouts??

This i the page: http://therainbowpride.com/myphp2/index.php
as you can see the layout did work

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 07, 2007 Apr 07, 2007

Copy link to clipboard

Copied

i found this website http://www.subcide.com/tutorials/csslayout/page2.aspx maybe if i follow this steps i will be able to understand more and learn enough to get me going, what do you think?

thank you

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 07, 2007 Apr 07, 2007

Copy link to clipboard

Copied

If you are using Dreamweaver, you might want to get David Power's book, PHP for Dreamweaver 8. It's pretty good.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 07, 2007 Apr 07, 2007

Copy link to clipboard

Copied

LATEST
yes, i have that book , just got it last week along with php solution, but i am finishing the larry ullman's book first before i start another.
so, the link i sent , can i learn the basic from it, before i start the book ?
i just want to fix the chapter 13 by adding a layout to it so that way i don't feel like i cheated.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines