Relative Content

Tag Archive for phphtmlcss

How to add CSS to text located in submit.php file

A contact form forms part of a single-page website. It is situated at the bottom of the page. When the form is completed successfully by a user a ‘success’ message is generated and displayed immediately above the contact form. I wish to add CSS to the text of that message. Specifically, centering the text and changing the colour.

Including navbars using Php

I’ve been working on my first ever fully fledged web project to try and learn php, and after copying and pasting my top navbar into the 15-ish pages that I have and the styling for it into the 15ish css files that I have, something just clicked and I realized that theoretically, couldn’t I just copy the code for it into a navbar.php file and include that into every page I need it in? Does it also copy the styling? How does it work exactly

Adding CSS class to element with PHP for what time of day it is

Okay, so I asked this question before, but I really did a terrible job explaining myself & may have even annoyed some folks. For that, I am sorry. So let me explain the issue better.
I have a header/hero div inside my php file which requires selecting between one of six classes per the current time of day in New York, EST time. The classes & times of day in which I would like them based on are as follows.
12:00am – 5:00am: tod__twilight
5:00am – 8:00am: tod__sunrise
8:00am – 12:00pm: tod__morning
12:00pm – 5:00pm: tod__afternoon
5:00pm – 8:00pm: tod_sunset
8:00pm – 12:00am: tod__night
The site I’m working on is a wordpress site so I would strongly prefer the code to be PHP based, not Javascript.

How can i, set number an inside image center?

I need to ensure that an image is centered number in an HTML email. While the HTML code works correctly in a Chrome browser, I need help with making it display correctly in an email client. I am give code,i am using php mailer — mail.php file below showing Body =`<table style=”width: 100%; text-align: center;”> […]

button is not working and does not insert into database

<h2>Reserve Asset</h2> <form action=”Student_Asset.php” method=”post” enctype=”multipart/form-data”> <div class=”form-group”> <label for=”asset_id”>Asset ID:</label> <input type=”text” id=”asset_id” name=”asset_id” value=”<?php echo $_GET[‘id’]; ?>”> </div> <div class=”form-group”> <label for=”student_id”>Student ID:</label> <input type=”text” id=”student_id” name=”student_id” value=”<?php echo $_SESSION[‘student_Id’]; ?>”> </div> <div class=”form-group”> <label for=”reservation_date”>Reservation Start Date:</label> <input style=”background-color: blue;” type=”date” id=”start_date” name=”start_date” > </div> <div class=”form-group”> <label for=”duration”>Reservation End Date:</label> <input […]

My navbar is getting cut by the container

I am new to HTML and CSS, and I am having a problem with my navbar. For some reason, the dropdown menu is getting cut off by the container. What do I need to add to the code to fix this?

.php extension to a stylesheet

I’m currently studying PHP, and I’m confused about whether I should use a PHP extension for a stylesheet based on a YouTube video I watched. Is it good practice, or should I stick to using the CSS extension? I don’t understand the purpose of using a PHP extension for a stylesheet. I’ve tried using the PHP file extension, but I don’t notice any difference. I expected there to be some difference in performance or functionality if the stylesheet is in PHP. Stack Overflow says there is an error in my question; can you help fix this?