Design of linked php page

#1

Hello everyone,

I am working on a PHP project as a beginner.
My goal is to make a database driven website, and i have chosen for Formula 1.
The coding is done and I am now starting with the design.
I am having trouble to change the design of the refered pages like coureurs or teams, or won worldcups. I think they are not connected or some sort. When I change things in the CSS file of the reffered page. It doesn’t really do anything.

I would appreciate the help

#2

as a beginner, a database driven website is a giant step. I am also a beginner. Good advice is to take small steps not giant steps.

We cannot see your code, so how can we help you? CSS is for styling html elements, so i have no idea what this has to do with PHP. Please post some code so members can see what you are doing.

#3

Like @johnphpnewb it’s impossible to help without the code.

I’d guess it’s some path issue. Ie the sub pages beeing inside a folder so if they refer to just “styling.css” then the browser will try to load yoursite.tld/folder/styling.css instead of yoursite.tld/styling.css. I prefer to have all paths from the web root so everything starts with /. That way a reference to a file will refer to the same file location no matter what folder you’re in.

1 Like
#4

<!doctype html>

Formule 1 database @import url("css/style.css"); <?php include ("db.php");

?>

<div class="welkom">
<h2>Beste Bezoeker,</h2>
	
<br>	
<h2>Op deze site vind u de actuele standen en cijfers van het Fomule 1 seizoen van 2018/2019!</h2>
<br>
<h2>Door op een van de kopjes hiernaast te klikken komt u op de pagina met de cijfers.</h2>
<br>
<h2>Wij geven u de vrijheid om de cijfers aan te passen en vertrouwen er op dat er geen misbruik van wordt gemaakt. </h2>
<br>
	
<h2>Thomas en Vidushan </h2>

</div>


<header>
	<div class="main">
		<ul>
 
				<li><a href='teams/f1teams_keuze.php'; ?>teams</a></li>

				<li><a href='coureurs/f1coureurs_keuze.php'; ?>coureurs</a></li>

				<li><a href='records/f1records_keuze.php'; ?>records</a></li>

				<li><a href='racetracks/f1racetracks_keuze.php'; ?>racetracks</a></li>
	
				<li><a href='plaatsingen/f1plaatsingen_keuze.php'; ?>plaatsingen</a></li>

				<li><a href='wk_titel/f1wk_titel_keuze.php'; ?>wktitels</a></li>
		</ul>
	</div>
</header>
#5

The formatting of your post is not helpful. Also you are not applying @JimL’s hint. At least the @import rule won’t apply without a proper <style> block. It may also be a cache problem, so open the webdevelopers console with F12 key and disable the cache, then reload the site to see an effect.

#6

Thanks everyone for the effort.
I wanted to let you guys know i have found the answer.
I linked al my php pages with 1 CSS file.
It was a very simple question but sadly my english was to bad.

Sewswa

1 Like