{"flag":true,"single":true,"pageTitle":"Transparent text over image in HTML CSS","post":{"id":178,"user_id":"1","slug":"transparent-text-over-image-in-html-css-d3ac","title":"Transparent text over image in HTML CSS","body":"<p>&nbsp;<\/p>\r\n<pre class=\"language-markup\"><code>&lt;style&gt;\r\n\r\n.container {\r\n  position: relative;\r\n  max-width: 800px; \/* Maximum width *\/\r\n  margin: 0 auto; \/* Center it *\/\r\n  overflow: hidden;\r\n}\r\n\r\n.container .content {\r\n  position: absolute; \/* Position the background text *\/\r\n  bottom: 0; \/* At the bottom. Use top:0 to append it to the top *\/\r\n  background: rgb(0, 0, 0); \/* Fallback color *\/\r\n  background: rgba(0, 0, 0, 0.5); \/* Black background with 0.5 opacity *\/\r\n  color: #f1f1f1; \/* Grey text *\/\r\n  width: 100%; \/* Full width *\/\r\n  padding: 20px; \/* Some padding *\/\r\n}\r\n\r\n&lt;\/style&gt;\r\n\r\n&lt;div class=\"container\"&gt;\r\n  &lt;img src=\"https:\/\/i.postimg.cc\/vmVfNqFn\/owner.png\" alt=\"Notebook\" style=\"width:100%;\"&gt;\r\n  &lt;div class=\"content\"&gt;\r\n    &lt;h1&gt;Heading&lt;\/h1&gt;\r\n    &lt;p&gt;Lorem ipsum..&lt;\/p&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;<\/code><\/pre>","category_id":"10","is_private":"0","created_at":"2023-08-16T16:35:20.000000Z","updated_at":"2023-08-16T16:35:20.000000Z","category":{"id":10,"user_id":"1","name":"CSS","slug":"css-a43c","parent_id":null,"created_at":"2023-03-21T01:17:14.000000Z","updated_at":"2023-03-21T01:17:14.000000Z"},"user":{"id":1,"name":"R GONDAL","email":"rizikmw@gmail.com","email_verified_at":null,"two_factor_confirmed_at":null,"current_team_id":"1","profile_photo_path":null,"created_at":"2023-03-12T10:49:33.000000Z","updated_at":"2025-01-10T12:59:00.000000Z","profile_photo_url":"https:\/\/ui-avatars.com\/api\/?name=R+G&color=7F9CF5&background=EBF4FF"}},"pageDesc":"&nbsp; &lt;style&gt;  .container {   position: relative;   max-width: 800px; \/* Maximum width *\/   margin: 0 auto; \/* Center it *\/   overflo - Transparent text over image in HTML CSS (Updated: August 16, 2023) - Read more about Transparent text over image in HTML CSS at my programming site [SITE]","categories":[]}