
-----------------------------------
Version
Mon Feb 11, 2008 2:42 pm

CSS and Iframe
-----------------------------------
I aint new to this stuff but im kinda new in centering things with CSS -.-

the CSS code i used to try to center and iframe is.

IFRAME.input {
	left : auto;
	right ; auto;
	/*
margin-left: auto;
    margin-right: auto;
*/
	top: 190px;
	position: absolute;
	visibility: visible;
}


when i use it in my main html file. is.





and i won't center is stays on the left.

all the help is appreaciated thanks

-----------------------------------
jeffgreco13
Tue Jun 10, 2008 10:00 am

Re: CSS and Iframe
-----------------------------------
well if that's a direct copy and paste... maybe it has something to do with the semi-colon after right? its supposed to be a colon.

-----------------------------------
Aziz
Tue Jun 10, 2008 10:41 am

RE:CSS and Iframe
-----------------------------------
Yeah he's got it. Also, instead of left and right, try margin-left anf margin-right (seting them to auto, only works in Firefox and IE7). you may have to remove position: absolute

-----------------------------------
Richard Knop
Mon Jun 23, 2008 9:59 am

Re: CSS and Iframe
-----------------------------------

IFRAME.input { 
  margin:0 auto; 
  }


^^

-----------------------------------
Gyonka
Sun Apr 24, 2011 3:54 pm

RE:CSS and Iframe
-----------------------------------
I agree with richard, margin: 0 auto; is for centering.

-----------------------------------
ProgrammingFun
Sun Apr 24, 2011 4:34 pm

Re: RE:CSS and Iframe
-----------------------------------
(seting them to auto, only works in Firefox and IE7)
