Logic Machine Forum
iFrame rounded corners and negative margins - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: iFrame rounded corners and negative margins (/showthread.php?tid=5414)



iFrame rounded corners and negative margins - sgraystar - 13.05.2024

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;
}



RE: iFrame rounded corners and negative margins - admin - 14.05.2024

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;
}



RE: iFrame rounded corners and negative margins - sgraystar - 14.05.2024

Aha, thanks.