Thursday, December 24, 2009

Help with web site coding?

So I want to be able to change my sidebar and have it change on all of my web pages. I have tried the PHP Include feature but I have a few questions about it:


Do I make a div and put the include code into the div? and


How do I position and sidebar or header from an include file.


I want to do it how this website did it:


http://www.t-swift.com/


Thanks!Help with web site coding?
To use a positioned div for your side bar, on each page have a sidebar div containing:





HTML CODE:


--------------------------------------鈥?br>

%26lt;div id=';sidebar'; style=';position:xxxxx;';%26gt;


%26lt;?php include('xxxxxx.xxx'); ?%26gt;


%26lt;/div%26gt;


--------------------------------------鈥?br>







for your include file, just put the full html you need to be placed at that position.





INCLUDE FILE:


--------------------------------------鈥?br>

%26lt;p%26gt;Hello World%26lt;/p%26gt;


--------------------------------------鈥?br>




End runtime result will be:


--------------------------------------鈥?br>

%26lt;div id=';sidebar'; style=';position:xxxxx;';%26gt;


%26lt;p%26gt;Hello World%26lt;/p%26gt;


%26lt;/div%26gt;


--------------------------------------鈥?br>







Robert Roati


http://www.seowebdesignworks.comHelp with web site coding?
The php include function is entirely different then and not dependant on an html div.





You dont need to have the include inside a div to be displayed proplerly, unless that is how your websites template is designed.

No comments:

Post a Comment