Michael on "How Do I Insert Into CSS File?"

ساخت وبلاگ

washingtonsblog
Member
Posted 3 hours ago #

The outstanding coder Amit Agarwal has a hack regarding embedding Youtube videos which requires I insert the following into my CSS:

<textarea> <style>
.youtube-container { display: block; margin: 20px auto; width: 100%; max-width: 600px; }
.youtube-player { display: block; width: 100%; /* assuming that the video has a 16:9 ratio */ padding-bottom: 56.25%; overflow: hidden; position: relative; width: 100%; height: 100%; cursor: hand; cursor: pointer; display: block; }
img.youtube-thumb { bottom: 0; display: block; left: 0; margin: auto; max-width: 100%; width: 100%; position: absolute; right: 0; top: 0; height: auto }
div.play-button { height: 72px; width: 72px; left: 50%; top: 50%; margin-left: -36px; margin-top: -36px; position: absolute; background: url("http://i.imgur.com/TxzC70f.png") no-repeat; }
#youtube-iframe { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
</style></textarea>

Here's my question (I'm a newbie): do I need to change <style> to
something like style {
?

In other words, will inserting html code such as <style> crash my CSS?

washingtonsblog
Member
Posted 1 hour ago #

Please ignore <textarea> ... I didn't know that would show!

generally, it is recommended to add new CSS into style.css of a child theme (by editing that file) or via a 'custom CSS' plugin

in either case, you would only add the stuff inbetween, but without the actual, <style> and </style>.

for posting code here in the forum, please read http://codex.wordpress.org/Forum_Welcome#Posting_Code

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 204 تاريخ : جمعه 7 خرداد 1395 ساعت: 3:34