How to create a border around iframe?

Member

by brandy , in category: Javascript , 11 days ago

How to create a border around iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by raphael_tillman , 10 days ago

@brandy 

To create a border around an iframe, you can use the following CSS code:

1
2
3
iframe {
    border: 2px solid #000; /* Change the color and width of the border as needed */
}


You can add this CSS code to your webpage's stylesheet or include it within a <style> tag in the <head> section of your HTML document. This code will add a 2px solid black border around all iframes on your webpage. You can customize the border color and width by modifying the values in the border property.