[css-d] Is there a simple way to center in an iframe?

2009-12-11 Thread MB
On Thu, Nov 12, 2009 at 2:21 PM, David Dorward dorw...@gmail.com wrote: 2009/11/11 Alan Gresley a...@css-class.com: Hello, Michael, since iframe is a deprecated inline element. Iframe is not deprecated (although is discouraged). If you are using the strict version of HTML 4.01, then iframes

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-13 Thread Michael Newberry
Alan, Yes, tried that early-on. The following code does not center the image in the iframe: a title=picture href=images/Picture%20391b.jpg target=_image img alt=picture src=images/Picture%20391b_small.jpg width=113 height=80 //a div class=center iframe frameborder=0 scrolling=auto

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-13 Thread Michael Newberry
Thanks to all for the suggestions. I'll try them and get back to you with the results. Michael - Original Message - From: Alan Gresley a...@css-class.com To: Michael Newberry m...@mirametrics.com Cc: css-d@lists.css-discuss.org Sent: Wednesday, November 11, 2009 5:11 AM Subject: Re:

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-13 Thread Michael Newberry
Alan, No, it is not an html question, but a css question, which is why I asked if there was a way to do this using css. In any case, I tried both of your html suggestions but neither one worked---apparently because they are html solutions that apply to the target frame, not the content of the

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-13 Thread Alan Gresley
Michael Newberry wrote: I'm pasting images into an iframe using a simple click on a link. The image always appears at the 0,0 scroll position inside the iframe. Is there a simple css way to center it? I've tried using text-align:center. Thanks, Michael Correction, iframe is not

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-12 Thread Alan Gresley
Michael Newberry wrote: I'm pasting images into an iframe using a simple click on a link. The image always appears at the 0,0 scroll position inside the iframe. Is there a simple css way to center it? I've tried using text-align:center. Thanks, Michael Hello, Michael, since iframe is

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-12 Thread Philippe Wittenbergh
On Nov 11, 2009, at 8:55 PM, Alan Gresley wrote: since iframe is a deprecated inline element. http://www.w3.org/TR/html401/present/frames.html#edef-IFRAME In html4, yes, but it is part of html5

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-12 Thread David Dorward
2009/11/11 Alan Gresley a...@css-class.com: Hello, Michael, since iframe is a deprecated inline element. Iframe is not deprecated (although is discouraged). There are two options using depreciated elements or depreciated attributes Why would we use deprecated parts of HTML to do this?

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-12 Thread Brian Cummiskey
I guess the question here is how are you invoking the iframe change? if your using javascript to do that, you can probably add a style set via JS at the same time. __ css-discuss [cs...@lists.css-discuss.org]

[css-d] Is there a simple way to center in an iframe?

2009-11-11 Thread Michael Newberry
I'm pasting images into an iframe using a simple click on a link. The image always appears at the 0,0 scroll position inside the iframe. Is there a simple css way to center it? I've tried using text-align:center. Thanks, Michael

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-11 Thread Brian Hazelton
I have never done this but I wonder if using position:relative and margin:0 auto; together would make it center. It is worth a try. __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-11 Thread david
Michael Newberry wrote: I'm pasting images into an iframe using a simple click on a link. The image always appears at the 0,0 scroll position inside the iframe. Is there a simple css way to center it? I've tried using text-align:center. Hmm, I think your CSS has to be in the HTML file

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-11 Thread Jorge Rumoroso
You have to apply that rule (text-align: center) in the element that contains the images. Where are you inserting it in the iframe? I suppose that your are doing it in the body, so you have to apply the rule to that: body {text-align: center}. margin:auto only works with block elements, so it

Re: [css-d] Is there a simple way to center in an iframe?

2009-11-11 Thread Brian Hazelton
maybe if it is the only thing in the iframe he can just set it to block as well, if there are other elements in the iframe it could prove problematic doing it that way though. __ css-discuss [cs...@lists.css-discuss.org]