Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

iframes madness

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1069
Location: Worcestershire

PostPosted: Mon Jun 02, 2014 2:31 pm    Post subject: iframes madness Reply with quote

Not strictly programming as I am avoiding javascript - I don't want my visitors to have to enable it. But html5/css3 comes close enough.

I am trying to use iframes as a way of re-using (transcluding) visual modules across multiple web pages. So I have one small web page for the main header and navbar, one for a side navbar and a third for the page footer. I then have a template for the rest of the pages, which invokes each of these navigation pages in a separate iframe.

Problem is, if I leave the iframe unstyled then a blank bar half an inch or more deep is added to the bottom of the transcluded page. So I get these blank bars underneath the header and footer in every page. Wastes screen space, looks bad, etc.

I can get rid of it by styling each iframe in the template with a height attribute, but that may not be robust across browsers as it ignores the actual page it contains, and will also need ny css stylesheet updating every time the navigation module changes size.

Other than javascript, does anybody have any ideas how to fix this so the iframe sizes properly according to the page it contains?
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
johnhudson
LXF regular


Joined: Wed Aug 03, 2005 2:37 pm
Posts: 870

PostPosted: Mon Jun 02, 2014 10:00 pm    Post subject: Reply with quote

At the risk to trying to teach grandmother to suck eggs, iframes have a seamless attribute which may cope with this though there are some caveats about using visual media in these cases.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast