Codes Tagged css

pseudo element in css with example

<p><strong>pseudo-element</strong> in CSS is a keyword added to a selector by that you can style a specific part of the selected element. </p><p>For example:- </p><ul><li>You can style the <strong>first letter </strong>or <strong>line </strong>of an element.</li><li>Insert content <strong>before </strong>or <strong>after </strong>the content of an element.</li></ul><p><br></p><pre class="ql-syntax" spellcheck="false">selector::pseudo-element { property:value; } </pre><p><br></p><p><strong>::before </strong>- Creates a <strong>pseudo-element </strong>which is the first child of the selected element. <strong>::before </strong>is inline by default </p><pre class="ql-syntax" spellcheck="false">.classname::before{ content:'Hello'; } </pre><p><br></p><p><strong>::after </strong>- Creates a <strong>pseudo-element </strong>which is the lastchild of the selected element. <strong>::after </strong>is inline by default </p><pre class="ql-syntax" spellcheck="false">.classname::after{ content:'Hello'; } </pre><p><br></p><p><strong>::first-letter </strong>it applies style on the first letter of the first line.</p><pre class="ql-syntax" spellcheck="false">span::first-letter{ font-size:50px; } </pre><p><br></p><p><strong>::first-line </strong>it applies on the first line of the block level element.</p><pre class="ql-syntax" spellcheck="false">p::first-line{ color:red; } </pre><p><br></p><p><strong>::placeholder </strong>it applies on the input or textarea placeholder text.</p><pre class="ql-syntax" spellcheck="false">input::placeholder{ color:red; font-size:20px; } </pre>

view_information

<p>&lt;?php</p><p>include "../config/db.php"; // Include database connection</p><p><br></p><p>// Fetch all records from tbl_information</p><p>$result = $conn-&gt;query("SELECT * FROM tbl_informasaun");</p><p>?&gt;</p><p><br></p><p>&lt;!DOCTYPE html&gt;</p><p>&lt;html lang="en"&gt;</p><p>&lt;head&gt;</p><p>&nbsp;&nbsp;&lt;meta charset="UTF-8"&gt;</p><p>&nbsp;&nbsp;&lt;title&gt;View Information&lt;/title&gt;</p><p>&nbsp;&nbsp;&lt;link rel="stylesheet" href="../css/style.css"&gt;</p><p>&lt;/head&gt;</p><p>&lt;body&gt;</p><p>&nbsp;&nbsp;&lt;h1&gt;School Information&lt;/h1&gt;</p><p>&nbsp;&nbsp;&lt;a href="../index.php"&gt;Home&lt;/a&gt; |&nbsp;</p><p>&nbsp;&nbsp;&lt;a href="../admin/dashboard.php"&gt;Admin Dashboard&lt;/a&gt;</p><p>&nbsp;&nbsp;&lt;br&gt;&lt;br&gt;</p><p><br></p><p>&nbsp;&nbsp;&lt;table border="1"&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;ID&lt;/th&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Name&lt;/th&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Address&lt;/th&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Description&lt;/th&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Actions&lt;/th&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;</p><p><br></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php while ($row = $result-&gt;fetch_assoc()): ?&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;?php echo htmlspecialchars($row['id']); ?&gt;&lt;/td&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;?php echo htmlspecialchars($row['name']); ?&gt;&lt;/td&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;?php echo htmlspecialchars($row['address']); ?&gt;&lt;/td&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;?php echo htmlspecialchars($row['description']); ?&gt;&lt;/td&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="view_info_detail.php?id=&lt;?php echo $row['id']; ?&gt;"&gt;View&lt;/a&gt; |&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="update_info.php?id=&lt;?php echo $row['id']; ?&gt;"&gt;Edit&lt;/a&gt; |&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="delete_info.php?id=&lt;?php echo $row['id']; ?&gt;" onclick="return confirm('Are you sure?')"&gt;Delete&lt;/a&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php endwhile; ?&gt;</p><p>&nbsp;&nbsp;&lt;/table&gt;</p><p><br></p><p>&nbsp;&nbsp;&lt;br&gt;</p><p>&nbsp;&nbsp;&lt;a href="add_info.php"&gt;Add New Information&lt;/a&gt;</p><p>&lt;/body&gt;</p><p>&lt;/html&gt;</p><p><br></p>
Add a codeAdd Code
Remove adsremove

Latest codes

view all

Latest Snippets

view all