473,581 Members | 2,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Spacing problem in IFrame

Hi All,

I'm working on building a website that presents a lot of CSS
examples. A menu in the left column lets the user choose an example,
which then populates the center column (and, later, the right column).

The source for the examples will be stored in a bunch of sub-folders.

Right now, Example 1 populates the center column, but it has a
scroll bar because it doesn't utilize the height of the center column.
I should be able expand Example1.html with a reference something in
CssVisualDemo.h tml that specifies the height, but what?

Thanks in Advance,
Richard

Code: http://home.comcast.net/~CaptQueeg/CssVisualDemo.html

Sep 12 '07 #1
9 3201
Just a couple things more:
I should be able expand Example1.html with a reference something in
CssVisualDemo.h tml that specifies the height, but what?

Correction: "I should be able to reference something in
CssVisualDemo.C SS" (rather than .html.)

Also, here's the previous version, where text populated the center
column, rather than an IFrame: http://home.comcast.net/~CaptQueeg/C...lDemo-Old.html

Sep 12 '07 #2
I've got a better idea that, sadly, doesn't seem to work:

I tried setting the innerHTML of a DIV with both the styling and body
of an example that uses selectors. I made a simple test case at
http://home.comcast.net/~CaptQueeg/T...s-WithSel.html,
which validates.

The key line is:
<div STYLE="h2{color : red; font-size: 10pt;}"<h1>H1</h1<h2>H2</h2>
<h1>H1</h1></div>

The font size works, i.e. the H2 element, and only that element, has
a reduced font size.

But the color attribute is on honored, regardless whether it's in the
first or second position. Nor did background-color work, when I tried
that instead of color.

Is there some way to get this working, especially since it is valid?

Sep 12 '07 #3
RichardOnRails wrote:
The font size works, i.e. the H2 element, and only that element, has
a reduced font size.
I see the <h2at my default browser rendition of a normal <h2>, and not
at 10pt. BTW, points are for printing; use percentages or em units for
screen use.
http://k75s.home.att.net/fontsize.html
Is there some way to get this working, especially since it is valid?
No, it is not valid CSS. And dodgy HTML, too.

<http://jigsaw.w3.org/css-validator/validator?uri=h ttp%3A%2F%2Fhom e.comcast.net%2 F~CaptQueeg%2FT estInlineStyles-WithSel.html>

--
-bts
-Motorcycles defy gravity; cars just suck
Sep 12 '07 #5
On Sep 12, 8:09 pm, "Beauregard T. Shagnasty"
<a.nony.m...@ex ample.invalidwr ote:

Thanks for posting back, Beauregard.
Have you considered making the 'user-selectable pages' complete pages,
and using includes for everything else around that content?
No, because I never heard about it, but it sounds promising
Might be
easier than messing with iframes, which are not valid in a Strict
doctype.
That's great! I took the iFrames route because someone thought it'd
be easier for me.
<http://validator.w3.or g/check?verbose=1 &uri=http%3A%2F %2Fhome.comcast ...>
Sorry 'bout that. It's because my script is still a work-in-progress.

I took a quick look on Google for a tutorial/guide on 'user-selectable
pages' . I haven't found anything good yet, but I'll keep hunting.

Again, thanks for turning me on to this technique.

Best wishes,
Richard


Sep 13 '07 #6
RichardOnRails wrote:
"Beauregard T. Shagnasty" wrote:

Thanks for posting back, Beauregard.
>Have you considered making the 'user-selectable pages' complete
pages, and using includes for everything else around that content?

No, because I never heard about it, but it sounds promising
In simple example... "pagefilename.p hp"

<?php
include "head.inc";
include "banner.inc ";
include "menu.inc";
/* Content for this page follows */
?>

<h1>This is a heading</h1>
<p>Content here...</p>

<?php
/* End content for this page */
include "footer.inc ";
?>

--
-bts
-Motorcycles defy gravity; cars just suck
Sep 13 '07 #7
On Sep 13, 8:30 am, "Beauregard T. Shagnasty"
<a.nony.m...@ex ample.invalidwr ote:
In simple example... "pagefilename.p hp"

<?php
[snip]
?>
Thanks for the example, but I don't know PHP and I don't really see
how I can generalize it to my situation.

The only write-up I've found on the Web that I might be able to apply
is "Style Sheet Switcher": http://tutorial.jcwcn.com/Web-Design...7-10/2092.html.
I'm just implementing an example based on that website so I can really
assess the applicability to my site.

I had hoped that W3C might have provided more details on user-
selectable pages. Unless I misunderstood its offerings, they didn't
seem that helpful to my goal.

If you know offhand of any site(s) that offer sample implementations
employing user-selectable pages,
I'd appreciate hearing about it/them.
--
Richard

P.S.You may want to ignore this paragraph: If I can't get "regular"
HTML/CSS code to work, then for each of my html/css examples, I'll
capture its browser image and display the image corresponding to the
user's selection in the center frame of main page. In addition, I'll
write a preprocessor to suck the style and body code from the examples
and stuff those chunks into string arrays for styles and bodies. When
a user chooses an html/css example, my site will display corresponding
style and body code in textarrays along side the image of the example
page. For now, that's my fall-back strategy. It's what you might
expect from an ex-Fortran, Cobol, PL/1, C, C++ programmer :-)
--
Richard

Sep 13 '07 #8
RichardOnRails wrote:
>
I had hoped that W3C might have provided more details on user-
selectable pages.
Um, aren't *all* web pages "user-selectable"?

I haven't really been following this thread, but it sound like SSI is
what you need. BTS gave you a php example, and here are some more ideas:
http://allmyfaqs.net/faq.pl?Include_one_file_in_another

--
Berg
Sep 13 '07 #9
On Sep 13, 5:37 pm, Bergamot <berga...@visi. comwrote:

Hi Bergamot,
I had hoped that W3C might have provided more details on user-
selectable pages.

Um, aren't *all* web pages "user-selectable"?
Yes, I didn't say that clearly. I was talking about the various kind
of selectors, like the half-dozen or so listed in
http://css.maxdesign.com.au/selectutorial/, e.g. Type, Class, ID,
Descendant. For my own edification, I want to illustrate the various
ways each of these techniques can be applied. Make sense?
I haven't really been following this thread, but it sound like SSI is
what you need.
I've done some SSI with Ruby on Rails. But I wanted to stay at the
level of CSS and Client-side JavaScript, maybe with AJAX ( which is
lighter machinery than ROR, AFAIK) if I have to use a webserver.

BTS gave you a php example, and here are some more ideas:http://
allmyfaqs.net/faq.pl?Include_ one_file_in_ano ther

That site looks right up my alley. Thank you very much for mentioning
it. I'll be studying it in the next couple of days. As I mentioned
to Beauregard, I'm concentrating on learning how to use debuggers for
JavaScript in the context of FireFox/FireBug and Aptana.

Best wishes,
Richard

Sep 19 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3447
by: Hal Vaughan | last post by:
I'm testing a GUI app on a couple Linux boxen and one Win2k box. I'm using Java 1.4.2 on each (or the closest on Win2k -- whatever version comes close). On one Linux box and the Win2k box the line spacing is very close (for example, when I use HTML in JLabels, or even in JTextAreas), but on the other Linux box, the line spacing is much...
12
39100
by: Rick DeBay | last post by:
I'm trying to create a layout table, where the spacing between rows varies. I've tried using setting margin-top and border-top for the rows I wan't spaced down from the one above, and I've also tried setting it on all of the cells of that row. This hasn't worked, so I was wondering if anyone knew how it could be done. Thanks, Rick DeBay
7
7107
by: Danny | last post by:
I have a small <div> element which contains two text blocks - one within <h5> tags and the other within <p> tags. I don't want any extra line spacing between elements so use the display:inline property. This works for IE6 but Opera7.54 and Netscape7.1 add large line spacing between the text blocks and any lines of wrapped text. The line...
5
2975
by: Andrew Poulos | last post by:
If I have a text INPUT within a block of text how do I 'correct' for the line spacing. The line spacing above and below the INPUT is larger than the line spacing generally: <div style="position:absolute; left:100px; top:100px; width:200px;>blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah...
4
3557
by: fleemo17 | last post by:
Is there a way to tweak the spacing of lines of text (or leading) *specifically* in IE6? I've created a "Quick Search" box in my layout which renders pretty consistently in all the browsers I've tested it on, except in IE6 for the PC. The spacing is completely inconsistent with all the other browsers. (See...
12
2203
by: Sebastien B. | last post by:
I'm wondering if it's at all possible to have spacing between a table's cells, and only between the cells, not between the outter cells and the table's border. See end of message for an example (make sure to view this in fixed width font). I've played around with different things, such as margin-right, etc. but I didn't get any results....
4
2458
by: metoikos | last post by:
I've scoured the web (clumsily, I'm sure) for information on the difficulties I am having, checked my markup in validators, and had a friend with more CSS clue look over it, but I haven't had any luck. I'll detail my difficulties here and hope for help. I will note that I'm using headings to delineate different sections of my message for...
10
11034
by: phil-news-nospam | last post by:
I have a table with 3 columns in 1 row. I want to increase the spacing _between_ the columns (gutter) _without_ increasing the spacing between those columns and the table itself. Is there a way to do that in CSS without having to code in extra dummy columns in HTML to create gutters? --...
1
3282
by: replyrpatil | last post by:
What I am trying to do: I need to print a compact access report (font 6 size) created using RTF2 program developed by Stephen Lebans to generate a TIF image of custom size (5.5 in x 2.0 in) Problem Recreation : Download attached RAR file (http://download.yousendit.com/627919383AFAA7E3 ) Steps 1) Install RTF2 program created by Lebans ...
0
7873
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8309
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5365
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3806
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1405
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1141
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.