...

View Full Version : Css or java script



jj72ny
10-22-2012, 03:15 PM
I want to put a few picks and some HTML ect. at the top of each page of my websight do I use java script or css to do this I am new to both but want to know witch one to studie up on first I don't like the looks of iframes

DanInMa
10-22-2012, 03:23 PM
depending on the situation you can use server side includes, both php (http://www.tizag.com/phpT/include.php)and asp (http://www.w3schools.com/asp/asp_incfiles.asp)have the capability

WolfShade
10-22-2012, 03:36 PM
Also, this is the wrong forum for questions. This is for posting scripts that work and the OP thinks might be useful to others.

I'm sure a mod will move this to the proper forum.

jj72ny
10-23-2012, 05:48 PM
I was kinda hoping there was a way with java or css cuz now I will have to learn something new oh well lol guess ill just finish up with learning java script and go to one of the other ones

jj72ny
10-23-2012, 05:58 PM
What I am looking for is just to put something kinda like css dose with styles. With an external page that would load to the top of each page with my logo and a menu bar.just so I don't have to put a bunch of coding at the top of each page just like a link or something. Php will do this?

DanInMa
10-23-2012, 06:16 PM
What I am looking for is just to put something kinda like css dose with styles. With an external page that would load to the top of each page with my logo and a menu bar.just so I don't have to put a bunch of coding at the top of each page just like a link or something. Php will do this?

yes, includes are really easy and they are the best solution. You can do something similar with javascript.
If you use an include, say you have a some html for your header. You code that html into a php file, just the html itself no doctype or anything like you normally would, Ill say its called mainheader.php and it's in your root folder under /includes/

the content so mainheader.php could be something like :



<div id='mainheader>
<ul>
<li>somelink</li>
<li>somelink</li>
<li>somelink</li>
<li>somelink</li>
</ul>
</div>




then right after the body tag in every php page you do this



<?php include( $_SERVER['DOCUMENT_ROOT'].'/includes/mainheader.php'); ?>


This is also assuming you link your css file in the head of the document.

jj72ny
10-23-2012, 07:45 PM
I thought it would be harder than that I will study up on php thanks for your help

jj72ny
10-28-2012, 02:01 AM
The php worked perfectly just one problem I have a drop down menu at bottom of include page and most of it drops below the original page where it can't be read. is there a spacing method I can use?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum