This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

iFrame rounded corners and negative margins
#1
How do you suggest I apply rounded corners and negative margins to a frame?

Today the frame size is 638 x 1233 and loads url https://reg.bom.gov.au/places/vic/melbourne/forecast/

This custom CSS works to show only a section of the web page:
Code:
.bom7day iframe {
  margin-top: -300px;
  margin-left: -20px;
}

Attempt to add border-radius only changes the lower right corner:
Code:
.bom7day iframe {
  margin-top: -300px;
  margin-left: -20px;
  border-radius: 8px;
}

Attempt to add extra css only changes top-left and lower-right:
Code:
.bom7day {
  border-radius: 8px;
  overflow: hidden;
}

.bom7day iframe {
  margin-top: -300px;
  margin-left: -20px;
  border-radius: 8px;
}
Reply
#2
You need to adjust iframe size via CSS. Width should be parent width + 20px, height should be parent width + 300px.
Code:
.bom7day iframe {
  width: ...px !important;
  height: ...px !important;
}
Reply
#3
Aha, thanks.
Reply


Forum Jump: