LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 07-09-2011, 07:17 PM   #1
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Rep: Reputation: 11
HTML / CSS Help


I've recently been working on HTML/CSS using only what I've learned from w3schools. Unfortunately, what I'm trying to do is set a page with www.example.com/#Section1, but allow /#Section1 on the same page, without moving down or up the page, just on the same box.

Anybody know the code for it?
 
Old 07-09-2011, 08:27 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Sorry, I'm not quite sure what you're trying to accomplish. Can you elaborate on that?
 
Old 07-09-2011, 08:59 PM   #3
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Original Poster
Rep: Reputation: 11
Okay, well a Wikipedia page has it organized in a similar way.

Let's use
http://en.wikipedia.org/wiki/Brian_Curvis
as my example.

When I click on "4 Remaining Career" it takes me to:
http://en.wikipedia.org/wiki/Brian_C...maining_career

But what I'm trying to do is imagine if the index was there, I clicked it, and it opened the section right there. Not as a new tab, or a new window but as if it were already there, loaded with the entire page and clicking it just opens up the text and pictures or whatever of the "#Remaining_career" part in the same window.
 
Old 07-09-2011, 09:32 PM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
I think I know what you mean.
You could use jquery (recommended) for this or iframes.

See this for a similar question
 
Old 07-09-2011, 09:38 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,322
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
You would likely be better off in a web developer forum or newsgroup.

The alt.html newsgroup tends to be very helpful, as long as questions are asked properly--lurk for a while before posting. About dot com also has a good section on html and css.

I've found the w3cschools to be both overwhelming and excessively terse for learning new stuff.

If you don't already have XAMPP installed, I would also suggest that you get it, so you can test stuff in your own webserver. Read the docs carefully. It is not designed to face the public unless you set up the security; by default, it is not password protected.
 
Old 07-09-2011, 09:40 PM   #6
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Original Poster
Rep: Reputation: 11
Alright, thanks guys. ^^
 
Old 07-09-2011, 09:45 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,322
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
It just occurred to me, why not download Wikimedia and take a look at the css?

http://www.mediawiki.org/wiki/Download
 
Old 07-09-2011, 10:52 PM   #8
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Original Poster
Rep: Reputation: 11
Wikipedia doesn't do it exactly the way I want.

What I was referring to keeps you on the page, but imagine if those options were in tabs, you clicked one and it opened up specifically only what was in that section but when you did click it, the link was http://www.wikipedia.org/example/#example.

I was using Wikipedia as a reference because it's links do that.
 
Old 07-09-2011, 11:24 PM   #9
sunnydrake
Member
 
Registered: Jul 2009
Location: Kiev,Ukraine
Distribution: Ubuntu,Slax,RedHat
Posts: 289
Blog Entries: 1

Rep: Reputation: 61
if i understand you correctly what you want is short index of page. and when you click on index item just below it selected section shows. im dunno about css(css3?) but with jscript this is possible
Quote:
<div onclick="var a=this.getElementsByTagName('div')[0];a.style.display=(a.style.display=='hidden')?'block':'hidden';">
Index 1
<div style="display:hidden;"> Content 1</div>
</div>
<div onclick="var a=this.getElementsByTagName('div')[0];a.style.display=(a.style.display=='hidden')?'block':'hidden';">
Index 2
<div style="display:hidden;"> Content 1</div>
</div>
same you can just move content using .innerHTML;
 
Old 07-11-2011, 06:23 PM   #10
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Original Poster
Rep: Reputation: 11
Thanks sunnydrake! That's actually exactly what I wanted.
 
Old 08-13-2011, 07:18 PM   #11
mipia
Member
 
Registered: May 2003
Location: lake michigan
Distribution: Debian, Mint, Slackware
Posts: 457

Rep: Reputation: 35
Sorry for blowing the dust of this thread but I have to ask:

How do you deal with font rendering in Linux? Patches? Rendering etc?
 
Old 08-13-2011, 07:29 PM   #12
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by mipia View Post
Sorry for blowing the dust of this thread but I have to ask:

How do you deal with font rendering in Linux? Patches? Rendering etc?
You've been a member on this forum long enough to know that you should start your own thread, haven't you?
 
Old 08-22-2011, 11:47 PM   #13
mipia
Member
 
Registered: May 2003
Location: lake michigan
Distribution: Debian, Mint, Slackware
Posts: 457

Rep: Reputation: 35
Quote:
Originally Posted by sycamorex View Post
You've been a member on this forum long enough to know that you should start your own thread, haven't you?
Sorry but that is completely off-topic. You might want to consider starting a new thread. My question was about html/css, not how to write a redundant comment. But thank you for your time!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS - Is there a way to put several lines of HTML into one line using CSS? Chronothread Programming 12 01-05-2011 06:06 AM
HTML/CSS/JS: Problem with <p> not having an absolute position with CSS. RHLinuxGUY Programming 7 03-03-2007 12:21 AM
A little HTML/CSS help? jon_k General 9 07-17-2005 01:49 AM
html/css retrodict Programming 5 11-01-2004 06:56 PM
html/css hylke Programming 0 06-27-2004 02:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration