Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2004, 01:55 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default iframe css properties?

hi,
bless me with a pervasive link again please
what are the stylesheet properties which can be set
for an iframe?

 
Old September 22nd, 2004, 02:04 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

You can go to
http://www.google.com/search?hl=en&ie=UTF-8&q=iframe



Numan
--------------------------------------------------
Love is the most precious thing of this world. So find it and grab it!
 
Old September 22nd, 2004, 11:16 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

nerssi,

According to Microsoft (which is not the authority, but they make the most popular browser on earth):

http://msdn.microsoft.com/workshop/a...s/frameset.asp
and
http://msdn.microsoft.com/workshop/a...ects/frame.asp
and
http://msdn.microsoft.com/workshop/a...cts/iframe.asp

HTH

-Snib <><
http://www.snibworks.com
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)
 
Old September 25th, 2004, 09:39 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Screw MS! Long live Firefox!
http://www.spreadfirefox.com/

The best place to look for what *interoperable* features are available is the W3C.
http://www.w3.org

The information here can be hard to follow, but basic information like what you are seeking isn't too hard to weed out of the jargon.

The <iframe> element:
http://www.w3.org/TR/html4/present/frames.html#h-16.5

The <iframe> element is what is known as a "replaced inline" element, so it is similar to the <img/> element. It can appear in the flow of text and its dimensions are replaced by the external file referenced in the src arrtibute. From a CSS standpoint anything that is allowed on images is also allowed on the <iframe> element.

You can thumb through the CSS specs to see what is possible.
http://www.w3.org/TR/CSS21/

In the CSS specifications you'll look for properties that apply to all elements, to inline elements, or to replaced inline elements.

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old September 25th, 2004, 02:51 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
quote: Screw MS! Long live Firefox!
http://www.spreadfirefox.com/
You think I still use IE?? What do you take me for?? :-)

I just posted the MS link because usually MS's documentation is pretty inclusive, and you have to code for IE whether you want to or not (or have someone else do it for you, of course).

-Snib <><
http://www.snibworks.com
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)
 
Old September 27th, 2004, 08:51 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> You think I still use IE?? What do you take me for?? :-)
That wasn't the point really. That was just a bit of sarcasm. :-)

> and you have to code for IE whether you want to or not
Not true, not everyone bothers with IE. Consider corporate intranets that have standardized on Firefox, which is happening more and more these days. IE hasn't been playing fairly for a while now. It isn't about whether or not to "code specifically for IE", it's about the interoperable standards. Because when you code specifically for IE you leave other, better browsers out in the cold.

> I just posted the MS link because usually MS's documentation is pretty inclusive
The IE docs are misleading because they include proprietary IE specific stuff that should be avoided and thus encourage bad, non-standard practices. My opinion is: I don't think anyone should write to one specific browser, but through the standards write to all browsers and hack for browsers that don't play fairly. The examples in the IE docs also rarely validate as any W3C accepted markup language.

> but they make the most popular browser on earth
We'll see if this continues to be the case, IE market share has been slipping by landslides among the technically literate and slipping unprecedentedly even among average users. While only a few percentage points among average users, it has been a steady decline and the first significant drop in IE usage in the eight years it has reined king. While I agree that everyone is going to have to put up with IE for some time still, its place at the top is by no means stable or guaranteed. Firefox 1.0PR got 2 million downloads in 10 days, more than it has ever had in the past! So IMO, that makes third-party browsers and interoperable standards more important than ever.

All of this is moot discussion really, this poster was asking about which CSS properties apply to <iframe> elements, which is information better retrieved from the W3C than from Microsoft.

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old September 28th, 2004, 04:03 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi and thank you both for links and the debate!
Well I'm working in a company and working on a project
and the organization who would utilize the project(I don't know the word which's to be used in this case: contractor?employer?...?help me out it you get what I mean)has decidedfor IE as the default browser.
Using some IE's specific attributes makes writing some very dynamic codes really easy.
The problem is that every display property must be set through css to make it easier for the company to change it, cos displaying properties are things which depends on tastes and etc.
Anyway now the problem is that for most of IE's specific properties I can't find the css equivalent. As for the Iframe I can't find properties such as marginwidth,marginheight,hspace,frameborder
and properties alike...(and general css properties such as border won't apply and won't do the same thing...)
It seems that first Microsoft invents a new property, adds it to IE and publishes it on web, then w3c releases its specifications,which I think the reverse must be right! Being ahead or behind it seems that Microsoft, unlike SUN, pays no attention to specifications at all.
The other thing is that suppose I find frameboder property through the
w3c links you provided above.How shall I find the css eguivalent there?
Ain't there a faster way?In w3c I found the frameborder and the possible values and all about the usage and the stuff alike,but there's no track of the css equivalent names to be used...
This is also true for the MSDN links...
 
Old September 28th, 2004, 07:53 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> Hi and thank you both for links and the debate!
> Well I'm working in a company and working on a project
> and the organization who would utilize the project(I don't know the word which's to be
> used in this case: contractor?employer?...?help me out it you get what I mean)has
> decidedfor IE as the default browser.

I feel sorry for you and your client. Hope they enjoy spyware, viruses, etc. :-(

> Using some IE's specific attributes makes writing some very dynamic codes really easy.
> The problem is that every display property must be set through css to make it easier for
> the company to change it, cos displaying properties are things which depends on tastes
> and etc. Anyway now the problem is that for most of IE's specific properties I can't
> find the css equivalent. As for the Iframe I can't find properties such as
> marginwidth,marginheight,hspace,frameborder
> and properties alike...(and general css properties such as border won't apply and won't > do the same thing...)

Why won't they do the same thing? At this point a link to an example is good.

> It seems that first Microsoft invents a new property, adds it to IE and publishes it on
> web, then w3c releases its specifications,which I think the reverse must be right! Being
> ahead or behind it seems that Microsoft, unlike SUN, pays no attention to specifications > at all

Almost true, Microsoft invents their "features" and then *tries* to get said feature through the W3C, which is not always successful. The point being Microsoft does little to discuss these features in the W3C community before adding them.

> The other thing is that suppose I find frameboder property through the
> w3c links you provided above.How shall I find the css eguivalent there?
> Ain't there a faster way?In w3c I found the frameborder and the possible values and all > about the usage and the stuff alike,but there's no track of the css equivalent names to > be used...
> This is also true for the MSDN links...

Use the border property, the border property has a number of different styling options. Again, a URL demonstrating the effect you're after would make it easier to point you in some direction.

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old September 28th, 2004, 12:03 PM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
One of the cases among others is a calendar.html file putting it in an iframe I want to get rid of all the margins and borders and specially the thing which is called frameborder It seems iframe has 2 borders one is around and one is in the frame (called frameborder?if I'm not mistaken)
in the stylesheet I set a border:none; and a margin:0px;(to get rid of the horizental and vertical white spaces on the left and on the top)
but It doesn't work at all. I have already tried setting margin-top:0px; and margin-left:0px; in the style sheet but they failed to work, while setting them inside the iframe via marginwidth and marginheight work just fine...
The only properties which seem to work with iframe through style sheets are the width and height properties(by which I want to show that there's nothing wrong with the stylesheet identification or the syntax) ...
thanks for waisting your time on an IE specific programmer!
(I use firefox for my own navigation.it's much more userfriendly!)
 
Old September 28th, 2004, 12:10 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Which version of IE are you viewing this in? Can you provide a link to a testcase, or supply some code here recreating either the effect you're after or highlighting what you want to get rid of?

According to the W3C, frameborder, marginwidth and marginheight are standard attributes, so why not just use those?

In CSS the border property should control the look and feel of the border, and the border-spacing IIRC handles the spacing of that border on frames. Don't know about how actual browser support is on this though. I know IE doesn't support the border-spacing property.

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail





Similar Threads
Thread Thread Starter Forum Replies Last Post
values from one iframe to another iframe URGENT raaj Beginning PHP 2 February 27th, 2007 12:19 PM
set the frameborder of an iframe to zero in CSS crmpicco CSS Cascading Style Sheets 3 April 12th, 2006 03:04 AM
How to use css with <iframe frameBorder="no"> bekim CSS Cascading Style Sheets 1 January 20th, 2005 08:57 AM
Image Properties & CSS TSEROOGY CSS Cascading Style Sheets 2 October 10th, 2004 09:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.