IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1834.78 MB
Powered by
Channel Info
Network: freenodeChannel: #html |
Search in www.irclog.org
Log from #html at freenode 2006-07-20
[00:19]<fzfzjz>hi
[00:21]<eyaexj>Hi!
[00:22]<fzfzjz>I have lets say three links, they're on the same page. They're on the same page, before the where the php array comes. I'd want to have the "current" link (the one I have just clicked and come to) to have a certain colour background.
[00:22]<fzfzjz>(same page written twice, sorry)
[00:22]<fzfzjz>so how to change the background colour of a link by clicking it? I want people to see that they're on "link2" page
[00:23]<eyaexj>Well, there are several ways...
[00:23]<fzfzjz>but if the page that has the links or div element that has the links is on the same page, I cannot change the styles of the link background
[00:23]<eyaexj>OK, I'm just getting confused now.
[00:24]<eyaexj>Can you put that in simpler terms?
[00:24]<fzfzjz>I will try
[00:24]<fzfzjz>ok, I have a navigation bar with links
[00:24]<eyaexj>And when you go to a certain page, you want that link to be highlighted, right?
[00:24]<fzfzjz>yes
[00:24]<fzfzjz>I can do it, BUT
[00:25]<fzfzjz>if the navigation bar's page doesnt change I cant assing a new class/id for the to-be-highlighted link.
[00:26]<fzfzjz>now I have it <a href="***" id="current"></a>
[00:26]<eyaexj>Does this mean that you're using.. the dreaded frames?
[00:26]<fzfzjz>but if I want the links to be in the frame, and the pages under the links change only
[00:26]<fzfzjz>dreaded?
[00:26]<eyaexj>Yeah.
[00:27]<fzfzjz>I only know judge dread
[00:27]<fzfzjz>dread means horror
[00:27]<fzfzjz>what does it mean in this context?
[00:27]<eyaexj>Horrible frames?
[00:27]<fzfzjz>:D
[00:27]<fzfzjz>no
[00:27]<eyaexj>http://www.useit.com/alertbox/9612.html
[00:27]<fzfzjz>I'm not using frames.
[00:27]<eyaexj>*phew*
[00:27]<fzfzjz>I'm using a php array function
[00:28]<eyaexj>Well, in terms of scripting, the easier way would be to set a class on <body> (which is what I usually do)
[00:28]<fzfzjz>which has one page as the base, and it loads content to certain part of the base page, you know it.
[00:28]<fzfzjz>I have set a class on body
[00:28]<eyaexj>So <body class="home"> and in the CSS, .home #nav-home { background: red; }
[00:28]<eyaexj>Then that should be enough, right/
[00:29]<fzfzjz>hmm...
[00:30]<fzfzjz>#nav-home is what?
[00:30]<fzfzjz>id?
[00:30]<fzfzjz>or when you click it?
[00:30]<fzfzjz>I've not come across this yet.
[00:30]<eyaexj>#nav-home is on the <a>
[00:31]<fzfzjz>id
[00:31]<fzfzjz>?
[00:31]<eyaexj>Yeah.
[00:31]<fzfzjz>I am not really following you
[00:31]<fzfzjz>but how does it know it is on the right page?
[00:31]<fzfzjz>I mean, if I change the page?
[00:31]<fzfzjz>agh
[00:32]<fzfzjz>any coding is beyound my intelligence
[00:32]<fzfzjz>why cant I explain this
[00:32]<maasaz>why do background images in style sheets have to have an absolutel link, versus relative?
[00:33]<eyaexj>Falgor: You'd set a class on body.
[00:33]<fzfzjz>riczho it's like I would have to move the id="current" to another link like first it is on "home" then "chicago" "new york"
[00:33]<fzfzjz>I have a class on the link
[00:34]<eyaexj>If this is confusing, just go with the class on body-- it's the simplest way (to use/explain for me)
[00:34]<fzfzjz>body of the base index.php?
[00:34]<fzfzjz>under which all the array pages work?
[00:34]<eyaexj>For each specific page, the only thing you need to change is the class on <body>
[00:35]<fzfzjz>riczho are you saying I have a different css for all the...?
[00:35]<eyaexj>So on the home page, it's class="home" and on the about page, it'd be class="about"
[00:35]<eyaexj>No. That's why this is a nice solution.
[00:35]<fzfzjz>but the page doesnt change
[00:35]<fzfzjz>I must be stupid or something
[00:36]<eyaexj>It has to change.
[00:36]<fzfzjz>it does not.
[00:36]<eyaexj>It's the only way to know what page you're on.
[00:36]<fzfzjz>well
[00:36]<fzfzjz>ok.
[00:36]<fzfzjz>I was just asking if there was a way to change it without changing the page
[00:36]<eyaexj>No.
[00:36]<fzfzjz>I've got it working well with the page changing
[00:37]<eyaexj>And the page *has* to change.
[00:37]<fzfzjz>but now I have to have the links in the array
[00:37]<fzfzjz>and the array pages DO change
[00:37]<eyaexj>Define "array pages"
[00:37]<fzfzjz>the array pages are inside the "frames"
[00:37]<wnznhzdsvnz>I have a webpage and there is an single letter and I don't know where in the webpage source code it's located.. can someone help me with this?
[00:37]<eyaexj>Try to use more well-known terms, because the mention of frames has already confused me.
[00:38]<eyaexj>wereHamster: Try view selection source in Firefox.
[00:38]<wnznhzdsvnz>I should add that it's only visible in IE
[00:38]<fzfzjz>the links will be inside the <?php ?>
[00:38]<eyaexj>wereHamster: darn.
[00:38]<fzfzjz>that is why they're basically inside a frame.
[00:39]<fzfzjz>the php-array function frame
[00:39]<fzfzjz>it's not a frame, but basically it is.
[00:39]<eyaexj>Falgor: So do you have a variable with the name of the page in it?
[00:40]<fzfzjz>right now I have two pages in the array, "front" and "services"
[00:40]<eyaexj>OK.
[00:40]<eyaexj>And you know what the current page is too, right?
[00:40]<fzfzjz>those are also on the navigation bar which is a <table> above the <?php ?> function
[00:40]<fzfzjz>first page to open is "front"
[00:41]<fzfzjz>so I guess I know
[00:41]<wnznhzdsvnz>the page is here: http://www.sokol.ch/jednota-sokol-aarau - you should see a 'h' bottom left of the area with the light-blue background, when I move the mouse over it the link 'Sokol Zurich' is highlighted, so it somehow belongs to that.
[00:41]<eyaexj>Falgor: Note: The navigation should probably be in a list, not a table.
[00:42]<fzfzjz>oh?
[00:42]<fzfzjz>riczho it's like [ link1 link2 link3 link4] horizontally
[00:42]<eyaexj>Yes, and that's a list.
[00:43]<fzfzjz>but to me a list goes down, not left or right
[00:43]<fzfzjz>so if I had a list...?
[00:43]<eyaexj>No, a list can go sideways as well.







