473,387 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.html that specifies the height, but what?

Thanks in Advance,
Richard

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

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

Correction: "I should be able to reference something in
CssVisualDemo.CSS" (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=http%3A%2F%2Fhome.comcast.net%2F~Cap tQueeg%2FTestInlineStyles-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...@example.invalidwrote:

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.org/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.php"

<?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...@example.invalidwrote:
In simple example... "pagefilename.php"

<?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_another

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
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...
12
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...
7
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...
5
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...
4
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...
12
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...
4
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...
10
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...
1
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) ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.