By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,118 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,118 IT Pros & Developers. It's quick & easy.

Align help for two seperate php files

P: n/a
tom

<?php

include 'c:\usr\apache\httpd\html\my\navi.php';
include 'c:\usr\apache\httpd\html\my\index.php';

?>

thats my current code, the problem is that the first include line needs
to be align in a specific area. the navi.php is my navigation page and
im tring to align it to a specific area. the index is the regular page
and doesn't need anything done.
anyone of your pro's know what im lacking?

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
tom wrote:
<?php

include 'c:\usr\apache\httpd\html\my\navi.php';
include 'c:\usr\apache\httpd\html\my\index.php';

?>

thats my current code, the problem is that the first include line needs
to be align in a specific area. the navi.php is my navigation page and
im tring to align it to a specific area. the index is the regular page
and doesn't need anything done.
anyone of your pro's know what im lacking?


Two possibilites come to my mind:

1.- Make the navigation area place itself at an absolute position on
your webpage. See the 'position' and 'display' properties of CSS
stylesheet (nothing to do with PHP here).

2.- Do the include of navi.php _inside_ your index.php, at the exact
place of your webpage where you want to place the navigation area:

***file: index.php***

<html>
<head><title>...</title></head>

<body>

<div id="navigation"><?php include("/path/to/navi.php"); ?></div>

<div id="main">Your main content.</div>

</body>
</html>

Jul 17 '05 #2

P: n/a
tom wrote:
<?php
echo '<div class="navi">';
include 'c:\usr\apache\httpd\html\my\navi.php';
echo '</div>';
include 'c:\usr\apache\httpd\html\my\index.php';

?>

thats my current code, the problem is that the first include line needs
to be align in a specific area. the navi.php is my navigation page and
im tring to align it to a specific area. the index is the regular page
and doesn't need anything done.
anyone of your pro's know what im lacking?


Now just define the class "navi" in your CSS file (or as a inline style)
as you like it.
I don't know CSS and I didn't test the specification below, it may
(probably will) not do what it appears (to me) it should do:

div.navi {
position: absolute;
left: 0;
top: 0;
width: 134px;
float: left;
}

--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
Jul 17 '05 #3

P: n/a
tom
THANKS GUYS, I didn't it consider CSS being an opition. I'm new and
this still looks like a foriegn language to me. Everything works fine
and thanks for the help once more.

code is here,

<html>
<head>
<title>Members Page</title>
<style type="text/css">
h1
{
position: absolute;
top: 100px;
left: 1px
width: 1px
}
</style>

</head>

<body>
<h1><?php include('\navi.php');</h1>
<div id="main">
<?php include('\index.php'); ?></div>
</body>
</html>

Jul 17 '05 #4

P: n/a
tom
THANKS GUYS, I didn't it consider CSS being an opition. I'm new and
this still looks like a foriegn language to me. Everything works fine
and thanks for the help once more.

code is here,

<html>
<head>
<title>Members Page</title>
<style type="text/css">
h1
{
position: absolute;
top: 100px;
left: 1px
width: 1px
}
</style>

</head>

<body>
<h1><?php include('\navi.php');</h1>
<div id="main">
<?php include('\index.php'); ?></div>
</body>
</html>

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.