Jump to content


Photo

How to connect html with CSS?


  • This topic is locked This topic is locked
6 replies to this topic

#1 n_s

n_s

    Forum Newcomer

  • Members
  • Pip
  • 2 posts

WDF Reputation

0
Neutral
  • Experience:Beginner
  • Area of Expertise:Entrepreneur

Posted 15 February 2009 - 01:29 AM

Hiii! I'm a newbie to this forum so please bear with me! I've got a good level of understanding for HTML and CSS. Although I've got a worrying problem, I want to know how to connect the html page to the css and create hundreds of pages. My website is about showcasing local businesses in the area, so each page of the website will be committed to every business.

Can anyone give me a quick run down on the whole process? Some people say not to include css in the html.. okay.. so that page links to the external css. Now how do i connect that css page to all the other hundreds of pages that i'll be producing, and how can i implement php into it? As you can see from my questions, I am very confused right now.

Someone please helpp!!!

Thanks.

Naweed.

#2 Meshach

Meshach

    Dev Ninja

  • Privileged
  • PipPipPipPipPip
  • 2,464 posts

WDF Reputation

3
Neutral
  • Gender:Male
  • Location:United States
  • Experience:Advanced
  • Area of Expertise:Coder

Posted 15 February 2009 - 01:32 AM

To attach an external css file just put this code within the <head> tag of your page...

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

Have fun.

#3 neilp

neilp

    Privileged

  • Privileged
  • PipPipPipPip
  • 698 posts

WDF Reputation

49
Excellent
  • Gender:Male
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 15 February 2009 - 08:01 AM

To attach an external css file just put this code within the <head> tag of your page...

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

Have fun.



Just to define what Meshach said you need to create a new file and save it as stylesheet.css. Then do what Meshach said. Remember to save your stylesheet file in the same folder (or directory) as your html files.

It's different with PHP, you just need to save your html files as php files. like index.php instead of index.html. Then add your php code anywhere inside that file. It doesn't have to be inside the head. I don't know much about php so you need to find other resources for that.

Try http://www.lynda.com

#4 n_s

n_s

    Forum Newcomer

  • Members
  • Pip
  • 2 posts

WDF Reputation

0
Neutral
  • Experience:Beginner
  • Area of Expertise:Entrepreneur

Posted 15 February 2009 - 12:57 PM

Thank you for the help guys, I really appreciate it!!
I guess its quite easy to link pages then, but sometimes I get so confused linking hundreds of pages together. I'll be implementing google site search to my website so I dont think il need a database for that, although my website will be like real estate, just with photogalleries, text and videos on each business pages. So does anyone think I should use a database or just add it as a compressed file in my directory to make life easier?

Again thanks for the replies :)

Naweed.

#5 Meshach

Meshach

    Dev Ninja

  • Privileged
  • PipPipPipPipPip
  • 2,464 posts

WDF Reputation

3
Neutral
  • Gender:Male
  • Location:United States
  • Experience:Advanced
  • Area of Expertise:Coder

Posted 15 February 2009 - 03:23 PM

Thank you for the help guys, I really appreciate it!!
I guess its quite easy to link pages then, but sometimes I get so confused linking hundreds of pages together. I'll be implementing google site search to my website so I dont think il need a database for that, although my website will be like real estate, just with photogalleries, text and videos on each business pages. So does anyone think I should use a database or just add it as a compressed file in my directory to make life easier?

Again thanks for the replies :)

Naweed.


No Problem.

#6 SeikoShadow

SeikoShadow

    Dedicated Member

  • Members
  • PipPip
  • 169 posts

WDF Reputation

32
Excellent
  • Gender:Male
  • Location:Isle of Skye
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 29 January 2014 - 09:14 AM

caron you've just dug up a thread from 2009? in other news it's impressive how many views this article alone has received.



#7 dap

dap

    Web Guru

  • Privileged
  • PipPipPipPipPip
  • 1,148 posts

WDF Reputation

204
Excellent
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer

Posted 29 January 2014 - 02:05 PM

posts should start to fall apart after a few years, letters missing or half formed :) no but seriously there should be a warning label on them/icon that a post is over x number of months or weeks old. chances are in the word of web design/development after  year it's pretty much out of date anyway ;)






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users