{"id":157,"date":"2014-08-18T09:32:45","date_gmt":"2014-08-18T09:32:45","guid":{"rendered":"http:\/\/html5box.com\/blog\/?p=157"},"modified":"2014-08-18T09:33:47","modified_gmt":"2014-08-18T09:33:47","slug":"change-lightbox-css-properties-with-own-code","status":"publish","type":"post","link":"https:\/\/html5box.com\/blog\/jquery-lightbox\/change-lightbox-css-properties-with-own-code\/","title":{"rendered":"Change Lightbox CSS properties with own code"},"content":{"rendered":"<p><strong>Question<\/strong>:<\/p>\n<p>Dear support team,<\/p>\n<p>I purchased a single license for the HTML5 lightbox product. The lightbox is installed in a testing website and working well for the most part. The videos are self hosted.<\/p>\n<p>Using the Chrome developer tools I was able to identify the following html page elements: <\/p>\n<p>#html5-lightbox-overlay<br \/>\n#html5-lightbox-box<br \/>\n#html5-next<br \/>\n#html5-prev<br \/>\n.html5-nav-container<\/p>\n<p>Adding custom CSS rules to these elements in the html document head does not override the default css.<\/p>\n<p>Can you please advise?<\/p>\n<p><strong>Answer<\/strong>:<\/p>\n<p>To change the css property with your own code, you need to add the <strong>!important<\/strong> at the end of each css value, for example, to change the background overlay color:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n#html5-lightbox-overlay {\r\n    background-color: #ff0000 !important;\r\n}\r\n<\/pre>\n<p>The !important will override the default css that is setup by the Lightbox script.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question: Dear support team, I purchased a single license for the HTML5 lightbox product. The lightbox is installed in a testing website and working well for the most part. The videos are self hosted. Using the Chrome developer tools I was able to identify the following html page elements: #html5-lightbox-overlay #html5-lightbox-box #html5-next #html5-prev .html5-nav-container Adding &hellip; <a href=\"https:\/\/html5box.com\/blog\/jquery-lightbox\/change-lightbox-css-properties-with-own-code\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Change Lightbox CSS properties with own code<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-157","post","type-post","status-publish","format-standard","hentry","category-html5-lightbox","category-jquery-lightbox"],"_links":{"self":[{"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/comments?post=157"}],"version-history":[{"count":2,"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/posts\/157\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/posts\/157\/revisions\/159"}],"wp:attachment":[{"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/media?parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/categories?post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5box.com\/blog\/wp-json\/wp\/v2\/tags?post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}