iframes and css problem

Associate
Joined
11 Jun 2006
Posts
24
Hey,

I'm trying to make my website as XHTML 1.1 strict as possible (granted I could just use transitional but I'm pedantic)


I'm trying to navigate using an iframe but xhtml 1.1 doesn't let me use the target='iframe' attribute of the <a> tag, is there a way of doing this in css, and if not what's the best way to get an iframe-like substitute that is acceptable to xhtml?

thanks
 
I don't think you can have iframes within XHTML Strict. You may have to look in to a JavaScript solution if you want to have validating code.
 
Why do you want to use iframes? There may be a better solution.

simply to allow multiple pages to be shown within another, website here

I know of a javascript solution that I tried by changing the inner html of divs but it caused all kinds of problems, anyone know of any others?

thanks for the info so far :)
 
Honestly there is no reason I can see that you need to use iframes for the site that you are building.

If you are pedantic and really want to code in XHTML 1.1 Strict lose the iframes and code each page as separate files.
 
Also, here you probably want to use <ul><li>Home</li><li>About Us</li><li>Contact Us</li></ul> and then use CSS to style it the way you want it to look.

Code:
<table>
<tr>
<td><b><a href="index.html">Home</a></b></td>
<td></td> <!-- there must be a way of doing this better but hey - I cheated - Mike :-) -->
<td></td>
<td></td>

<td></td>
<td></td>
<td><b><a href="aboutindex.html" target="frame">About Us</a></b></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><b><a href="contactus.html" target="frame">Contact</a></b></td>
</tr>
</table>
 
You could use PHP or HTML for includes instead of using an iframe.

Also use UL and LI for lists and style it using CSS as Ekim suggested.

You shouldn't need to use any tables with the design you've linked to.
 
Back
Top Bottom