Quote:
Originally Posted by willscarlet
This may be a dumb question but I have to ask all the same.
|
Not a dumb question, pretty popular question in the PHP section.
There is no way to accomplish what you are looking for through
HTML/CSS, other than using the
:target psuedo class, which doesn't have full browser support (only IE9+).
Target Article, essentially you are passing a
hash (#) value (www.website.com/index.php
#blog) in the URL.
---------------------------
Quote:
Originally Posted by willscarlet
The problem im having though, is how to make the content change in the box without actually changing the page, like a one page website but without the content all showing at once.
|
You are talking about passing
variables in the URL with
PHP:
Take a URL like this for instance: www.website.com/index.php
?page=blog
PHP Code:
<div id="left-nav">Left Nav</div>
<div id="main-content">
<?php
if($_GET['page'] == 'blog') {
?>
<p>This is my blog. Since it is set after the "?", this part will show.</p>
<?php>
} elseif($_GET['page'] == 'contact') {
?>
<p>This is my contact page.</p>
<?php
}
?>
</div>
<div id="right-nav">Right</div>
This way only a part of your website will change (and yes, this is preferable over iframes).
Passing variables in the URL Article
---------------------------
Quote:
Originally Posted by willscarlet
I can do something like that with an Iframe but I am being told that I need to do it a different way, as Iframes are bad practice while im learning css/html.
|
iframes are not bad practice. They were meant to be used more for inserting external websites (something that is not related to your page), for instance a twitter "tweet" button. Everything with that button has different style, different scripts, and so on.
@VIP

it's 2012! Using an
<object> for a twitter button?!?