Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Using DIVs within a PHP file
Old 09-05-2010, 06:38 AM Using DIVs within a PHP file
Junior Talker

Posts: 3
Name: Euan
Trades: 0
Hi All,

Hope you can help, i have been pulling my hair out over this one and there isnt much left.

I am creating a website which was going to use a menu on each page but then this was getting to complex to I opted for the <?php include("menu.php"); ?> route.

now I have this on all my pages my divs do not want to work

This is the basic file.

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pirate - ADC Activities - Rotherfield District - Home Page</title>
<link href="style.css" rel="stylesheet" type="text/css" />


</head>
<body>
<div id="holding">
      <div id="centre-top">
      </div>

      
           
            <div id="menu-block"><?php include("menu.php"); ?></div>



<div class="text" id="text-block">
<p class="fronpage style1">Hi, I be pirate, ADC Activities for Rotherfield District, yrr. Welcome me hearty to me’ website, this be where I will put all me details for camps / activites.  You’ll be finding that you need to be quick as there are lots of scurvy sprogs out there that will take anything that is going, and spaces go darn quick, yar. Don’t forget to check back regularly to see what booty I have on offer for you’r scurvy sea dogs.  Don’t forget to be watching out for the Jolly Roger on the camp.</p>
  </div>

  
  <div class="text" id="text-news">
  <p class="textheader">Latest News</p>
  <p class="text"><span class="textheader"><img src="images/T_Chest.gif" width="37" height="26" hspace="5" /></span><a href="Harry_Potter.html">30th August 2010 - Harry Potter Film Opening Night - details available soon</a></p>
  </div>    

</div>
</div>
</body>
</html>
This is my CSS file which holds the DIVs
HTML Code:
#holding{
    width:1000px;
    height:550px;
    margin:auto;
    background-image:url(images/background.jpg);
    background-repeat:no-repeat;
}
#centre-top{
    width:auto;
    height:100px;
    position:static;
}
#menu-block{
    width:auto;
    height:10px;
    padding-left:130px;
    padding-bottom: 10px;

}    
#footer{
    width:900px;
    height:10px;
}    

#text-block{
    width:760px;
    height:auto;
    margin-left:130px;

}
#text-news{
    width:760px;
    height:200px;
    margin-left: 130px;    

}
#text-mainbody{
    width:760px;
    height:325px;
    margin-top:10px;
    margin-left: 130px;
    overflow-x:none;
    overflow-y:scroll;
    

}
#photos{
    width:760px;
    height:325px;
    margin-top:10px;
    margin-left: 130px;    
    overflow-x:none;
    overflow-y:scroll
}

#text-blockbottom1{
    width:950px;
        height:380px;
}
Can anyone help me in getting the coding right.

Thanks

A live version of the problem can be found here if you select all you can see the text in the div has been located on the bottom left instead of ontop of the image.
alter_ego1981 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-05-2010, 01:32 PM Re: Using DIVs within a PHP file
Junior Talker

Posts: 3
Name: Euan
Trades: 0
I have managed to do a work around but its not ideal.

I have ended up putting the Include menu in a table

HTML Code:
<div id="holding">
      <div id="centre-top">
      </div>  <table width="75%" border="0" align="center">
  <tr>
    <td><?php include("menu.php"); ?></td>
  </tr>
</table>
Would still like to hear from you if there is a proper way of doing this.

Thanks
alter_ego1981 is offline
Reply With Quote
View Public Profile
 
Old 09-05-2010, 04:28 PM Re: Using DIVs within a PHP file
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Without seeing the page and the code that "doesn't work" it's difficult to offer any advice.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-05-2010, 04:43 PM Re: Using DIVs within a PHP file
Junior Talker

Posts: 3
Name: Euan
Trades: 0
I have readded the error page to here
alter_ego1981 is offline
Reply With Quote
View Public Profile
 
Old 09-05-2010, 05:51 PM Re: Using DIVs within a PHP file
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And the differences are?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-06-2010, 06:33 PM Re: Using DIVs within a PHP file
kids's Avatar
Ultra Talker

Posts: 301
Trades: 0
Read all your code! It seem to have a "</div>" , it may be stayed in wrong place at the end of code.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
kids is offline
Reply With Quote
View Public Profile Visit kids's homepage!
 
Reply     « Reply to Using DIVs within a PHP file
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.95501 seconds with 12 queries