•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 374,021 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,729 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 956 | Replies: 3
![]() |
•
•
Join Date: Nov 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hello,
Is it possible to create a menu template in CSS? I thought only style code could be put in the CSS, but a friend says that I could create a menu template using CSS.
The menu would have 2 horizontal lines at the top for choices and there would be a medium notes/new section on the far right and an area for PHP code output in the remaining area.
I know this PHP part, should be asked in another area, but I am asking it here because it goes with this (sorry). When the user selects a menu choice from one of the 2 menu bars, I need the PHP to direct the output to the large area, is that possible in conjunction with this being done using CSS?
example:
-------------------------------------------------------------------
-------------------------------------------------------------------
-------------------------------------------------------------------
| |
| |
| |
Is it possible to create a menu template in CSS? I thought only style code could be put in the CSS, but a friend says that I could create a menu template using CSS.
The menu would have 2 horizontal lines at the top for choices and there would be a medium notes/new section on the far right and an area for PHP code output in the remaining area.
I know this PHP part, should be asked in another area, but I am asking it here because it goes with this (sorry). When the user selects a menu choice from one of the 2 menu bars, I need the PHP to direct the output to the large area, is that possible in conjunction with this being done using CSS?
example:
-------------------------------------------------------------------
-------------------------------------------------------------------
-------------------------------------------------------------------
| |
| |
| |
Didnt understood your problem well.
Well, i suppose u r referring to external css files, since it could be used by several files and one change in that file would be affected to all pages, so its a template. I didnt understood this problem well, but i think it's possible....(as an inference to what i have understood
)
•
•
•
•
Is it possible to create a menu template in CSS?
•
•
•
•
I know this PHP part, should be asked in another area, but I am asking it here because it goes with this (sorry). When the user selects a menu choice from one of the 2 menu bars, I need the PHP to direct the output to the large area, is that possible in conjunction with this being done using CSS?
) •
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 916
Reputation:
Rep Power: 5
Solved Threads: 46
you can't create objects/elements in CSS. you can layout objects and elements, and describe their properties to a certain extent. You would still need HTML objects to hold the parts of the menu (the menu hyperlinks,graphics,etc). The CSS could be used to arrange these elements in a menu-like fashion.
If you're using PHP, avoid creating one huge PHP file that inserts a HTML page into the middle. Create one tiny PHP file that inserts a number of HTML fragments. It's messy, but faster than (hyper)text processing a long file. You could do that a number of ways.
Ideally, don't use PHP atall. Serve well organised, automatically constructed HTML if you want to create a consistant look and feel. There's certain situations where that isn't appropriate, but unless your page content is going to change at a daily (or higher) frequency and be based on user input; you shouldn't ever need to process entire pages on-demand at the server.
In some "benchmark tests", I found that just renaming an index.html file to index.php made it load over 5 times slower. I didn't use a stopwatch, but it was very clearly visible.
If you're using PHP, avoid creating one huge PHP file that inserts a HTML page into the middle. Create one tiny PHP file that inserts a number of HTML fragments. It's messy, but faster than (hyper)text processing a long file. You could do that a number of ways.
Ideally, don't use PHP atall. Serve well organised, automatically constructed HTML if you want to create a consistant look and feel. There's certain situations where that isn't appropriate, but unless your page content is going to change at a daily (or higher) frequency and be based on user input; you shouldn't ever need to process entire pages on-demand at the server.
In some "benchmark tests", I found that just renaming an index.html file to index.php made it load over 5 times slower. I didn't use a stopwatch, but it was very clearly visible.
If it only works in Internet Explorer; it doesn't work.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
- CSS Tab menu (HTML and CSS)
- CSS & JS Menu Problem on IE (JavaScript / DHTML / AJAX)
- CSS compatibility and Menu appearance ??? (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: make css apply to a chunk of html
- Next Thread: Footer



Linear Mode