Complex HTML setup and layout question
Hello, I'm working on a more complex layout for a website (see added sketch image). It has topics, and those topics have different articles you can read.
I've been mulling over what would be a good approach to tackle this, and would like some thoughts on this.
So I was thinking about putting the topics in a list, and those topic articles in their own list. So a list in a list. The topics would be anchor tags. I don't know if this is a handy way to tackle this.
The other thing I was thinking about, is how those anchor tags would work. Is it a good idea to make separate new HTML pages for each topic/article? Or better to have them stacked on top of each other in one HTML file, and then have a display none/JS button combo? Would iframes work too? Or is that more for bringing in websites outside of the one you're on?
Would love to hear some thoughts on this, thanks in advance!
2 Replies
1) iframes are for loading other websites (like you guessed), without both websites interfering with each other. CSS/JS does not get interchanged.
2) I personally would only make one list with all information (maybe minus the article itself), since the headline of the article is probably the same as Topic/Info.
3) Having all articles on the page (in HTML) would give you the option to switch them out with animations. You could also use JS to change content of the articles.
Thanks for your thoughts! I'll have a go at trying some stuff out.
If the switching out through JS would be done with display none, that will affect CEO if I'm not mistaken? Since all of the text will be hidden/unreadable.
I've also found sites that use PHP (with asp?) for this kind of thing, but that's currently outside my scope of knowledge. (And JS with loading in pages is possible too, but I'll have to read up on it more to learn how that works.)