4 replies [Last post]
jfm617
Offline
newbie
Last seen: 16 years 23 weeks ago
Joined: 2006-04-20
Posts: 2
Points: 0

Workin on a site - first using CSS so be kind!

www.wgcordaro.com if you want to see the layout!

I'm using a traditional format with header and left nav with a central content section on each page. At least for the most part.

My question is can I set up CSS to act as a 'frame' in the sense that I can enter an entire html page(including html, head, and body tags) into my central content section without butchering the page?

I ask because the site is going to feature some writing which is being saved as individual html pages and uploaded* to my server.

I do not want to have to validate each upload and strip out all of the unneeded content at that point and try to reconfigure the page for each upload especially since some of the pages may and probably will contain style information itself within the head tags?

My solution so far has been to launch the upload in a new page and forgo the header and leftnav portion - this works but I'd really like to keep the header and left nav around the content.

Any ideas - I know this can be accomplished using frames but don't want to go down that route unless absolutely required!

Thanks is advance for any ideas - John

*[as a side as I'm assuming someone may point out the hazards associated with file uploads - I believe Ive taken enough precaution in terms of the uploads as it will only be one or two people allowed to upload and since its their site I don't imagine they will upload malicious code. Regardless - I've added some checking to prevent malicious scripts from being uploaded ].
[/b]

Tags:
thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 22 weeks 1 day ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

CSS instead of a frame to include full html pages?

Moved to Off Topic because per se, this isn't a function of CSS.

Unfortunately, if you embed one page within another, it will throw up validation errors all over the shop.

I think (and others may have better suggestions) that this may be one of those times when it's ok to use a simple frameset layout.

Verschwindende wrote:
  • CSS doesn't make pies

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 9 years 9 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

CSS instead of a frame to include full html pages?

If you don't want to strip the unwanted tags out, you could try using an iframe.

Life's a b*tch and then you die!

jfm617
Offline
newbie
Last seen: 16 years 23 weeks ago
Joined: 2006-04-20
Posts: 2
Points: 0

CSS instead of a frame to include full html pages?

Thanks to those who replied - Didn't think this could be accomplished via CSS but it was worth asking!

Going to try the iframe - thanks again for the help and suggestions

John

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 9 years 9 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

CSS instead of a frame to include full html pages?

Be aware that IE had a few iframe exploits a while ago, whereby site owners could craft an iframe that would allow an attack of a user's PC. This does not mean that iframes are insecure (AFAIK), but it does mean that IE may now treat them as suspicious in the normal way that Microsoft flips from ignorance of security problems to complete overkill! To be on the safe side, I would google the subject a little, and test your site in the latest IE browsers with security set to High (or whatever the exact setting is).

Life's a b*tch and then you die!