943,682 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jul 21st, 2004
0

Layout in CSS

Expand Post »
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.
Similar Threads
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Jul 21st, 2004
0

Re: Layout in CSS

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
Reputation Points: 54
Solved Threads: 20
Master Poster
DaveSW is offline Offline
765 posts
since Jul 2004
Jul 21st, 2004
0

Re: Layout in CSS

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.
HTML and CSS Syntax (Toggle Plain Text)
  1. <div id="ads" style="position:absolute; right:0px; width=20%; height=100%">
  2. <!-- include file="ads.html" -->
  3. </div>
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Jul 22nd, 2004
0

Re: Layout in CSS

What server side stuff does your server support? (just checking).

also if your server supports ASP you're missing a # -

<!-- #include file="ads.html" -->
Reputation Points: 54
Solved Threads: 20
Master Poster
DaveSW is offline Offline
765 posts
since Jul 2004
Jul 22nd, 2004
0

Re: Layout in CSS

Greetings.
Yea, my server supports ASP.
Oh! Yea, I did include a '#', forgotten to type that out in my last post.
I've seen people using <!-- #include file="header.inc" --> and <!-- #include file="footer.inc" -->. But mine won't work.
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Jul 23rd, 2004
0

Re: Layout in CSS

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?
Reputation Points: 54
Solved Threads: 20
Master Poster
DaveSW is offline Offline
765 posts
since Jul 2004
Jul 24th, 2004
0

Re: Layout in CSS

Greetings.
Nope, my main page is simply index.html.
Below is a sample of my footer.html.

HTML and CSS Syntax (Toggle Plain Text)
  1. <link rel="stylesheet" type="text/css" href="redevolve.css">
  2. <span class="something">
  3. Copyright reserved<br>
  4. red_evolve 2004
  5. </span>

And, in index.html, I have

HTML and CSS Syntax (Toggle Plain Text)
  1. <html>
  2. <!-- meta tags, head tag, and other relevants -->
  3. <body>
  4. <!-- A few div tags for navigator menu, content -->
  5. <div id="footer">
  6. <!-- #include file="footer.html" -->
  7. </div>
  8. </body>
  9. </html>

Please advise.
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Jul 24th, 2004
0

Re: Layout in CSS

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.
Reputation Points: 54
Solved Threads: 20
Master Poster
DaveSW is offline Offline
765 posts
since Jul 2004
Jul 26th, 2004
0

Re: Layout in CSS

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.

HTML and CSS Syntax (Toggle Plain Text)
  1. #ads
  2. {
  3. position: absolute;
  4. left: 100px;
  5. width: 20%;
  6. height: 100%;
  7. padding-top: 10px
  8. }
  9.  
  10. #homepage
  11. {
  12. width: 80%;
  13. height: 100%;
  14. padding-top: 10px;
  15. padding-left: 25%;
  16. text-align: center
  17. }

http://cc.domaindlx.com/redevolve/snapshot.jpg

[** Edit: I renamed index.html to index.asp, and it worked, yeah! Thanks a lot! **]
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Jul 31st, 2004
0

Re: Layout in CSS

take the width of #homepage and use a combination of margins to move it 20% and 100px from the left - i.e. two divs, one with the px margin-left, the other with the % margin-left.

That make any sense to you?
Reputation Points: 54
Solved Threads: 20
Master Poster
DaveSW is offline Offline
765 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Displayed Text in MS Internet Explorer
Next Thread in HTML and CSS Forum Timeline: Help with dynamic menu





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC