Heres a strange query

This is a discussion on "Heres a strange query" within the Web Page Design section. This forum, and the thread "Heres a strange query are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 14th, 2006, 09:31
Daniel's Avatar
Elite Veteran
Join Date: Sep 2006
Location: The Kingdom of Rabbits
Age: 22
Posts: 2,051
Blog Entries: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Heres a strange query

How do you link CSS Style sheets to external html documents?

give us some help please

thankies.
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 14th, 2006, 10:44
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Heres a strange query

Not quite sure what you are asking here. What do you mean in this case by 'external html documents'?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 14th, 2006, 10:56
Daniel's Avatar
Elite Veteran
Join Date: Sep 2006
Location: The Kingdom of Rabbits
Age: 22
Posts: 2,051
Blog Entries: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Heres a strange query

basically ive got a css style sheet and i want to link it to 3 pages so its effects are used on these 3 pages. but as i only ever do internal im not sure what to do!
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 14th, 2006, 18:11
Junior Member
Join Date: Nov 2006
Location: Los Angeles
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Heres a strange query

Well...

You don't link style sheets to html documents; it's the other way around.

So add a semantic link in the head tag to the three html documents that you want to invoke the style sheet.

Is this what you're asking or am I just not getting the question?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 14th, 2006, 18:56
Daniel's Avatar
Elite Veteran
Join Date: Sep 2006
Location: The Kingdom of Rabbits
Age: 22
Posts: 2,051
Blog Entries: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Heres a strange query

ive got it now - thanks for ur help
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 14th, 2006, 20:31
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Heres a strange query

It may be the way you interpret english but I would say you do 'link' stylesheets to html documents.

It's consider the best way to do things to have your css in separate stylesheet(s).

This/these is/are then linked into your html pages using:
Code: Select all
<link rel="StyleSheet" type="text/css" href="yourstyles.css" />
<link rel="StyleSheet" type="text/css" href="yourstyles-print.css" media='print' />

<!--[if IE]>
<link rel="StyleSheet" type="text/css" href="ieonly.css" />
<![endif]-->
This last one allows you to add in a style sheet for IE which contain the tweaks need to get IE looking like Firefox, etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 14th, 2006, 21:13
Junior Member
Join Date: Oct 2006
Location: NW Oregon
Age: 23
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Heres a strange query

I use pretty much the same method as ukgeoff mentioned but mine usually look like this:

Code: Select all
        <link rel="stylesheet" type="text/css" media="screen" title="Default Layout" href="./css/universal.css" />
        <?php
            if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') ) {echo("<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" title=\"Default Layout\" href=\"./css/sc.css\" />"),"\n";}
            else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') >=6 ) {echo("<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" title=\"Default Layout\" href=\"./css/ie.css\" />"),"\n";}
            else {echo("<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" title=\"Default Layout\" href=\"./css/sc.css\" />"),"\n";}
        ?>
My way may be a bit overly complicated to look at, but in the end (in my experience) it's much easier to work with.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 15th, 2006, 09:47
Daniel's Avatar
Elite Veteran
Join Date: Sep 2006
Location: The Kingdom of Rabbits
Age: 22
Posts: 2,051
Blog Entries: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Heres a strange query

ive used what geoff suggested - thankies all
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
css, html, linking

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL query query dangergeek Databases 3 Apr 12th, 2007 12:45
Another strange IE problem... minute44 Web Page Design 10 Oct 18th, 2006 18:17
Very strange problem indeed! timmytots Flash & Multimedia Forum 2 Dec 31st, 2005 15:54
Very strange problem indeed! timmytots Flash & Multimedia Forum 5 Dec 3rd, 2005 18:26


All times are GMT. The time now is 14:14.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved