Is it possible to use 2 css styles in a website?

  • liliace
  • Born
  • Born
  • liliace
  • Posts: 1

Post 3+ Months Ago

Hi, i'm using dreamwaver and i was wondering if there is a way to use 2 css styles in a website...for example, a css for the index and a different one for the rest like about, contact, etc...
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

yes but why people don't like it when you change the page a lot they will think they are on a different site.

Not sure how to do it in dreamweaver but in coding just change the path to the new style sheet
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

Actually tastysite, some people use the index as a welcome page that sometimes asks the user if they want a Flash Version or simple textual version of their site.

You could use as many CSS as you like per website/webpage(s). I would suggest though to keep design similar to keep people from wondering if they went to a different site like tastysite mentioned in his post.
  • pjdwebdesign
  • Born
  • Born
  • pjdwebdesign
  • Posts: 1

Post 3+ Months Ago

Muliple .css style sheets is possible in Dreamweaver. Use Classes to be more specific to certain areas of text etc.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

pjdwebdesign wrote:
Muliple .css style sheets is possible in Dreamweaver. Use Classes to be more specific to certain areas of text etc.

It's possible anywhere.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23460
  • Loc: Woodbridge VA

Post 3+ Months Ago

I don't suppose anyone has considered explaining to liliace how you would go about using multiple style sheets? Why you would want to? i.e. practical application where they would be beneficial.
  • northstjarna
  • Beginner
  • Beginner
  • northstjarna
  • Posts: 58
  • Loc: Chertsey, UK

Post 3+ Months Ago

I've found the easiest way to do this is on a dynamic site. We have done this on dynamic sites where each page has a different color scheme identified by a page identifier... We identify the pages by a type code or an ID so if the type is in the URL indicating the home page it gets those records in the DB, but this can also be used to change the style sheets:

Quote:
<cfif url.type = "IDX" >
style sheet 1
<cfelseif url.type = "AU">
style sheet 2
</cfif>


in php

Code: [ Select ]
<?php if($_GET['type'] == 'IDX') { ?>
    <link rel="stylesheet...
<?php } elseif ($_GET['type'] == 'AU') { ?>
    <link rel="stylesheet...
<?php } ?>
  1. <?php if($_GET['type'] == 'IDX') { ?>
  2.     <link rel="stylesheet...
  3. <?php } elseif ($_GET['type'] == 'AU') { ?>
  4.     <link rel="stylesheet...
  5. <?php } ?>


that's a good way...

another way would to be to identify some kind of variable on the home page and test for it's existence or maybe it's name... ie if the page is index.php then show this style sheet.

Thanks

Andi
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

ATNO/TW wrote:
I don't suppose anyone has considered explaining to liliace how you would go about using multiple style sheets? Why you would want to? i.e. practical application where they would be beneficial.

I just figured he knew that for different page he would put a different source in the href part. I guess I didn't think about telling him things he didn't ask for.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

I run two style sheets on almost every page I make, one is a structural style sheet and the other is a "style" style sheet. Basicly the structural css file is the page layout and placement code, while the "style" css file contains everything for my text, so links paragraphs and things like that.

I find it much easier to separate the two much like I like to separate my html from my PHP. They serve two different purposes.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 31 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.