•
•
•
•
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 425,936 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 1,603 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: 5615 | Replies: 24
![]() |
| |
Greetings.
I have 2 columns layout using <div>.
Say, <div id="navMenu"> and <div id="content">.
Is it possible to target links clicked on "navMenu" to be displayed in "content"?
I have done this using iFrame. Can I do it without using any frames?
Please advice. Thanks.
I have 2 columns layout using <div>.
Say, <div id="navMenu"> and <div id="content">.
Is it possible to target links clicked on "navMenu" to be displayed in "content"?
I have done this using iFrame. Can I do it without using any frames?
Please advice. Thanks.
"Study the past if you would define the future" - Confucius
Generally you'd use another page to do it. e.g. index.htm would have your menu and the content for the index page. Page1.htm would have the menu and page 1's content.
A useful technique is the use of includes to add a menu or other reapeated code into multiple pages. http://www.hardcoder.com/scripting/p...lude_files.php
A useful technique is the use of includes to add a menu or other reapeated code into multiple pages. http://www.hardcoder.com/scripting/p...lude_files.php
Greetings.
Thanks for your feedback.
I have tried to use the include function but I don't understand why it would not work.
can I do something like this? I've tried but nothing came out.
Thanks for your feedback.
I have tried to use the include function but I don't understand why it would not work.
can I do something like this? I've tried but nothing came out.
<div id="ads" style="position:absolute; right:0px; width=20%; height=100%"> <!-- include file="ads.html" --> </div>
"Study the past if you would define the future" - Confucius
What server side stuff does your server support? (just checking).
also if your server supports ASP you're missing a # -
<!-- #include file="ads.html" -->
also if your server supports ASP you're missing a # -
<!-- #include file="ads.html" -->
Can you post the content of the html file you're including?
Is your main page a .asp extension?
in the file to be included, have you just put the actual code you want to include - no doctyle or body tags etc?
Is your main page a .asp extension?
in the file to be included, have you just put the actual code you want to include - no doctyle or body tags etc?
Greetings.
Nope, my main page is simply index.html.
Below is a sample of my footer.html.
And, in index.html, I have
Please advise.
Nope, my main page is simply index.html.
Below is a sample of my footer.html.
<link rel="stylesheet" type="text/css" href="redevolve.css"> <span class="something"> Copyright reserved<br> red_evolve 2004 </span>
And, in index.html, I have
<html> <!-- meta tags, head tag, and other relevants --> <body> <!-- A few div tags for navigator menu, content --> <div id="footer"> <!-- #include file="footer.html" --> </div> </body> </html>
Please advise.
"Study the past if you would define the future" - Confucius
I believe your index page needs to be renamed to index.asp for asp code to work. Otherwise it will not be processed as ASP.
I use php and that's the way php works, so I guess asp is the same.
I use php and that's the way php works, so I guess asp is the same.
Greetings.
I will try what was advised by you.
By the way, can someone please help me look at this codes below?
The <div id="ads"> is the rectangle on the left hand side, while the <div id="homepage"> is the bigger rectangle in the center.
The display looks fine in IE & Opera7, but not in Mozilla :-|
In Mozilla, the content of #homepage spread across to the right hand side, not overlapping the #ads, but stretches to the right, until the horizontal scroll bar appears. FYI, the #ads & #homepage lie inside another <div id="content">
And, I specified <div id="content"> to be of width=80% of the body which is 100%.
Please help.
http://cc.domaindlx.com/redevolve/snapshot.jpg
[** Edit: I renamed index.html to index.asp, and it worked, yeah! Thanks a lot! **]
I will try what was advised by you.
By the way, can someone please help me look at this codes below?
The <div id="ads"> is the rectangle on the left hand side, while the <div id="homepage"> is the bigger rectangle in the center.
The display looks fine in IE & Opera7, but not in Mozilla :-|
In Mozilla, the content of #homepage spread across to the right hand side, not overlapping the #ads, but stretches to the right, until the horizontal scroll bar appears. FYI, the #ads & #homepage lie inside another <div id="content">
And, I specified <div id="content"> to be of width=80% of the body which is 100%.
Please help.
#ads
{
position: absolute;
left: 100px;
width: 20%;
height: 100%;
padding-top: 10px
}
#homepage
{
width: 80%;
height: 100%;
padding-top: 10px;
padding-left: 25%;
text-align: center
}http://cc.domaindlx.com/redevolve/snapshot.jpg
[** Edit: I renamed index.html to index.asp, and it worked, yeah! Thanks a lot! **]
"Study the past if you would define the future" - Confucius
[quote=red_evolve]Greetings.
This is the bit of code where the box model stuff applies. If you've figured out those links you'll realise IE is saying 80%-25%=55% wide, whilst Mozilla is saying 80%+25%=105%. :!:
#homepage
{
width: 80%;
height: 100%;
padding-top: 10px;
padding-left: 25%;
text-align: center
}![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Why do people wish for tableless with CSS? (HTML and CSS)
- Simple css templates (Site Layout and Usability)
Other Threads in the HTML and CSS Forum
- Previous Thread: Heading tags and div tags
- Next Thread: Help with dynamic menu


Hybrid Mode