Damen
Nov 6 2007, 11:53 PM
| | I am making a website for my IT Support class and a program called "Cox Connects Kids" for my mid-term assignment. Now I have the whole layout made and I will post a screen shot down lower.
My basic problem/question is this:
I have a right section of the page(A div) and it is supposed to be a global news part that shows the same on every page(I.e. home,contacts,help) and I was wondering if I can somehow edit my CSS file to have it in there and just change it the one time for all the pages.
I am guessing there is some way to do this but I couldn't figure it out.
If any of this was unclear please ask me to explain further on any points.
A screen shot: (Right part entitled "Global News1/2")

Thanks in advance for any help. |
Reply
jlhaslip
Nov 7 2007, 12:03 AM
php includes will do that. have a read of the Tutorials at the http://w3schools.comif you need an example, I can write a Tutorial for you.
Reply
Damen
Nov 7 2007, 12:08 AM
Grrr, I was hoping that it wasn't going to come to that. I will have a look at the tutorial though. I know quite a bit about PHP. But the problem that I was coming up with was that I was told by my adviser that the district will have to do something with the HTML file and convert it to some kind of file with "nuke" in the name, it wasn't "PhpNUKE" though, I know that. So I will have to ask him tomorrow if the server we have will be able to run any PHP. Thanks for the reply I will edit this post with more information when I get any confrimation, and looked through the tutorials. -EDIT- All right! Well it looks quite easy to do after looking through the tutorials but again I will still have to see if they can be PHP files instead of HTML.
Reply
rvalkass
Nov 7 2007, 07:26 AM
You can avoid PHP if you want. Using some clever Apache knowledge, you can get another file included in a document. All you need to do is put this line in where you want to load the external document, then rename the file with the extension .shtml CODE <!--#include virtual="INCLUDE.html" --> I use it on this site to get the menu to appear on the left (ignore the poor CSS  ). I have a file called menu.html which I include in every other page using the code above (with INCLUDE replaced with menu, obviously). Then I renamed all the files that include the menu to have the .shtml extension.
Reply
Damen
Nov 7 2007, 12:29 PM
QUOTE(rvalkass @ Nov 7 2007, 01:26 AM)  You can avoid PHP if you want. Using some clever Apache knowledge, you can get another file included in a document. All you need to do is put this line in where you want to load the external document, then rename the file with the extension .shtml CODE <!--#include virtual="INCLUDE.html" --> I use it on this site to get the menu to appear on the left (ignore the poor CSS  ). I have a file called menu.html which I include in every other page using the code above (with INCLUDE replaced with menu, obviously). Then I renamed all the files that include the menu to have the .shtml extension. Okay well I copied all the files to try it this way. I went into the index.html to test it out, took out the "News Part" and replaced it with CODE <!--#include virtual="globalnews.html" --> . I made a new HTML file named "globalnews.html" and put what I took out of the index in there. I then changed the extension of the index to .shtml. Went to the index.shtml and there was nothing in the news... Anything I might have done wrong, or do I need to install apache to see the effects without uploading?
Reply
jlhaslip
Nov 7 2007, 01:37 PM
check with rvalkass for the correct .htaccess file information on that method also, I found a code snippet which might work for you using standard (?) html. Treat the menu as an Object and include the html file? CODE <object type="text/html" data="linktest.html" width="600" height="40"> <param name="BorderStyle" value="1" /> <param name="MousePointer" value="0" /> <param name="Enabled" value="1" /> </object> I have not had a chance to test this method myself, yet. Reports are that it is slow and also, IE may have some trouble with it. http://w3schools.invisionzone.com/index.php?showtopic=16231
Reply
rvalkass
Nov 7 2007, 03:25 PM
QUOTE(Damen @ Nov 7 2007, 12:29 PM)  Went to the index.shtml and there was nothing in the news...
Anything I might have done wrong, or do I need to install apache to see the effects without uploading? You need to have Apache running, and you need to view the file through Apache ( i.e by going to http://localhost/ ). You have added all the code in correctly and from the sound of it have renamed everything correctly too. The code you use is picked up by Apache as a special command it follows before it serves up the HTML. Of course if you directly open the file up in a web browser (the path will be something like file:///path/to/file/index.shtml ) then it hasn't been through Apache, so the command never gets run. If you upload it to your web hosting or use Apache on your local machine then you will be able to see the effect. QUOTE(jlhaslip @ Nov 7 2007, 01:37 PM)  check with rvalkass for the correct .htaccess file information on that method No .htaccess file is needed for this one - it works out of the box  You can do some very powerful and useful stuff with these commands. One of my favourites is using it to issue different style sheets to different browsers. It avoids all the messy hacks to get IE to work right and keep the code much cleaner and easier to manage. It also allows you to send witty insults to people still using IE
Reply
Damen
Nov 8 2007, 12:27 PM
Well I tried to apache one again and uploaded it here to test it out and it didn't work. I was able to get the "OBJECT" one to work but only in firefox! I tried to look up how to use OBJECT with EMBED so it will work in both versions but I couldn't find anything. If anyone knows how to get it to work in IE also this will solve my problem. I asked my adviser about PHP yesterday and he told me he would ask the server admin, hopefully I will get a reply on that today. The file "conversion" thing I was talking about was to something called ".NET NUKE" or something of the sort. I don't think he is talking about ASP.NET but I am not sure. Again, thanks for all of your helpful solutions!
Reply
Recent Queries:--
css change paragraph width - 38.22 hr back.
Similar Topics
Keywords : , global, news, problem, change, paragraph, text, css, style, change,
- Style Not Displayed Correctly On Firefox [resolved]
(16)
Text Size Problem
(6) Ok i have a skin for an ipb board that im working on, and there is just one problem left with the
skin and that is that when you view it in Internet explore, the text comes out looking so small you
cant read it. but it looks fine in every other browser. Any body no what might cause this and how i
could fix it? if you need to see the css code just let me know and i will post it. Thanks....
Question About Css
Setting the style of titles. (5) Hello, I would like to ask a question about setting a style for titles on my web site. So far I have
managed to set my titles with a different capital by doing this: CODE h1.title:first-letter
{color: gold; font-size=xx-large; font-style: oblique; background: black}; Then my
titles come out with a big golden italic capital in a black box, and I get there by doing CODE
<h1 class="title">Blablablablabla</h1> However, if I also want a certain
background for the rest of my title, eg. a golden background or even a backgro....
Align Text Column Without Tables Using Css
Is it possible to get a 3 column alignment without using tables with C (13) I know I can use tables to get this effect but I am not sure if CSS can do it. I have not found any
examples so far, the only alignments with CSS I have come across are whole div elements and nothing
for inside formatting like tables offer. Heres my current stage of my layout so far. select a
character to see output. http://sonesay.trap17.com/chars.php
http://sonesay.trap17.com/profile.css The attached file is of my original plan but at this stage
I cannot do a php+ajax pagination for characters because of lack of knowledge so I went with the
simple drop down lis....
Is It Possible To Align Text To The Center And Justify It?
Example inside! (6) Basically, I have a list (like shown below) but as you can see, some parts stick out more than
others, and it doesn't look ordered. What I wish to know is if it's possible to justify the
text so it's ordered, but also keep it in the centre, using CSS /tongue.gif"
style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Although if another coding
language needs to be used, then that's ok /smile.gif" style="vertical-align:middle" emoid=":)"
border="0" alt="smile.gif" /> Example: Beginning with A Beginning with O Beginning with V Beginn....
How Can I Indent Text A Specified Amount
(every line, not just the first) (4) Hey all I'm working on several pages in HTML using external CSS formatting and i need a table
for navigation along the left hand side with links in it and i want the text to sit next to this
table to the right the entire length of the page even though the table will end, probably about half
way down. eg: QUOTE ____ ____| text text text ____| text text text ____| text text text ____|
text text text ------text text text ------text text text (the "-"'s are to add spacing as i
cant use multiple spaces. See how the text stays in line and doesn't rever....
Creating Style Sheets
(5) I am attempting to create style sheets in order to make editing easier. I have created one style
sheet that has the basics for my horizontal menu. However I would like to create another that will
have the links for the menu. My first menu works because it is all css formatted. However, the
portion I want to use that has the "link details" is in .html. Can this be put into a style sheet,
and if so how do I create that? The website can be viewed at http://www.faithcity.org/test2.html ....
Alternate Style Sheet
hows that? (6) I know that you can declare alternate stylsheets for your pages, but i dont know how will a user
change it, i mean, i know you can change styles depending on media, or even with some js or server
side coding, but with pure html? how does the user set what style he wants to be displayed? the
code goes something like that: CODE <link title="Alternate Style"
href="/alt1.css" rel="alternate stylesheet" media="screen"
type="text/css" /> thanks... -lozbo....
Free: Css - Style Sheet Editors And
CSS Scrollbar Makers (7) CSS - Style Sheet Editors : Ranfo Cascading Style Sheet Editor http://ranfo.com/csseditor.htm
EclipseStyle http://www.greeneclipsesoftware.com/eclipsestyle.htm BHead - Meta Tags & CSS
Generator http://home5.swipnet.se/~w-52253/hyper/pro...ead/bhsetup.exe CSS Style Generator
http://www.10002.org/download/CSSStyleGen.zip Balthisar Cascade
http://www.balthisar.com/site/index.php CSS Scrollbar Makers: Scrollbar Skinner
http://www.survivorx.com/telechargement/Sc...%20Skinner2.zip ScrollBar
http://home.hccnet.nl/s.j.francke/software...ollbarsetu....
Looking for , global, news, problem, change, paragraph, text, css, style, change,
|
|
Searching Video's for , global, news, problem, change, paragraph, text, css, style, change,
|
advertisement
|
|