I am trying to add a border to some conetnt on wordpress, and because i do not know how to add a css file i was trying to do everything in html (or at least i think is html). My knowledge of coding is left to my years in highschool.
This is the content around which i want to create a simple black border of 1 or 2 px:
<iframe src="https://link_to_my_file/file.pdf" style="width:1000px; height:300px;" frameborder="1"></iframe>
however this does not work. So i tried this way:
<iframe src="https://link_to_my_file/file.pdf" style="width:1000px; height:300px;" frameborder="1"></iframe> <style> iframe.solid {border-style:solid} </style>
but this also did not work.
How do i put things in the proper way without necessarily using a separate css file?
If you want to use inline HTML styling:
<iframe src="https://link_to_my_file/file.pdf"
style="width:1000px; height:300px; border: 1px solid black;"></iframe>
The out put will not work in the snippet.
Attribute which are deprecated in HTML5 for <iframe>
scrolling
frameborder
align
longdesc
marginwidth
instead of using these as iframe inline attribute you can use it in css
DEMO:
iframe{
border:4px solid red;
}
<iframe src="https://www.google.co.in/?gfe_rd=cr&dcr=0&ei=WyV_WvDBOY_E8wfHmba4Aw"></iframe>
visit this link for more info of deprecated attributes
https://html.com/tags/iframe/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With