Old 24-06-2007, 19:58   #1 (permalink)
bagelpirate
Registered User
 
Join Date: Jun 2007
Posts: 21
Include .html files with CSS

I have my main page, called layout.html. I want a drop down menu that I have completely coded on ddm.html to appear in layout.html.

I know I can do this with PHP, but i'd rather develop it offline, CSS should be able to do this, I just dont know the code.

I do know the code to fetch pages with CSS Vars, but that hasnt worked for a html page with content.
  Reply With Quote
Old 25-06-2007, 01:21   #2 (permalink)
neka
meow
 
Join Date: Dec 2006
Location: plymouth, uk.
Posts: 188
Send a message via MSN to neka
I've never seen something like that done before with CSS, link me to an example if you can.
Why don't you just include the code from ddm.html into layout.html?
  Reply With Quote
Old 25-06-2007, 01:24   #3 (permalink)
fivel
Keithics
 
fivel's Avatar
 
Join Date: May 2006
Posts: 20
Send a message via MSN to fivel Send a message via Yahoo to fivel Send a message via Skype™ to fivel
yeah.. me too.. "code to fetch pages with CSS Vars"?
  Reply With Quote
Old 25-06-2007, 02:01   #4 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 6,494
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
Quote:
CSS should be able to do this

Best of luck.
__________________
  Reply With Quote
Old 25-06-2007, 03:26   #5 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,901
Quote:
I know I can do this with PHP, but i'd rather develop it offline
Have you considered installing PHP locally on your machine?
  Reply With Quote
Old 25-06-2007, 06:27   #6 (permalink)
adam c
berserker than thou
 
adam c's Avatar
 
Join Date: Sep 2005
Location: Bristol
Posts: 450
I don't see a way to do this with CSS. If it can be done it must be some weird hack because CSS isn't designed to do that.
I would take the above advice and install PHP locally and use that.
  Reply With Quote
Old 25-06-2007, 07:20   #7 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 519
Send a message via MSN to djeglin
More to the point - Why have you used a whole separate page to code your navigation menu? If its that complicated, you're doing something wrong. Code?
__________________
My signature sucks.
  Reply With Quote
Old 25-06-2007, 07:42   #8 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,901
Quote:
Originally Posted by djeglin
More to the point - Why have you used a whole separate page to code your navigation menu? If its that complicated, you're doing something wrong. Code?
Not necessarily. By modularising those components which appear on every page, and then bringing them in as 'included' files, you're actually improving a site's overall maintainability.
To make site-wide changes to the menu, you only need to change one file.

Same principle as external css and js.
  Reply With Quote
Old 25-06-2007, 08:28   #9 (permalink)
herkalees
Semantics, yay.
 
herkalees's Avatar
 
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,088
CSS is not a scripting language. It is meant to style html elements, and that's about it. If you want to include the content of File A inside File B, you need a server-side scripting language.

End of story.
  Reply With Quote
Old 25-06-2007, 08:44   #10 (permalink)
freelancr
Web Developer
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 2,010
I take it you are using windows, if you don't want to install Apache & PHP you could use SSI Includes on IIS. Otherwise your only option is frames.
  Reply With Quote
Old 25-06-2007, 08:52   #11 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 519
Send a message via MSN to djeglin
Quote:
Originally Posted by Bill Posters
Not necessarily. By modularising those components which appear on every page, and then bringing them in as 'included' files, you're actually improving a site's overall maintainability.
To make site-wide changes to the menu, you only need to change one file.

Same principle as external css and js.
I can see your point here... but if they arent managing the whole site with php, then i cant imagine that its really likely to be complicated enough, or be changed frequently enough, to warrant this? I was more making the point that a drop down menu should be very simple, and that for the fuctionality (discounting updating) it shouldn't be difficult to build it in to the page.
__________________
My signature sucks.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8