The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Basic CSS Stylesheets
 

Post Reply  Post Oekaki 
 

Posted By Message

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
18th June, 2005 at 13:44:55 -

I've created a couple of basic CSS stylesheets for my new website, which should make things easier to modify if ever I needed to. However, I need to know, does CSS work well in Firefox or Mozilla browsers?

 
n/a

Matt Boothman

The Nissan Micra of forum members

Registered
  20/09/2002
Points
  109

Game of the Week Winner
18th June, 2005 at 13:55:21 -

Sometimes - most sites work fine, but for some reason the Scorpion E site gets buggered in Mozilla. Just create your stylesheet and test it in Mozilla. If it works in that, it'll work in IE anyway.

 
http://soundcloud.com/normbo - Listen to my music.

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
18th June, 2005 at 13:58:20 -

wow, i figured most mozilla users would have switched to firefox by now.

 
Craps, I'm an old man!

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
18th June, 2005 at 15:12:42 -

Bah I can't be bothered I'll just stick to aitch tee em ell.

 
n/a

Matt Boothman

The Nissan Micra of forum members

Registered
  20/09/2002
Points
  109

Game of the Week Winner
18th June, 2005 at 15:24:25 -

No, don't be an arse - use See Ess Ess. It actually saves your tonnes of work in the long run when you decide to change the site colours and that.

 
http://soundcloud.com/normbo - Listen to my music.

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
19th June, 2005 at 06:31:40 -

Mozilla and Firefox will render stylesheets as per W3C specification. IE has a mind of its own with certain attributes, so just check your stylsheets in both browsers. You could use Browsercam - www.browsercam.com - but that's probably overkill (plus it's a limited trial).

 
www.thenatflap.co.uk

Muffin Batel [neonair games]



Registered
  09/08/2002
Points
  900
22nd June, 2005 at 21:00:32 -

curses to limited trials!

 
n/a

Joshua M.



Registered
  01/06/2004
Points
  1999
23rd June, 2005 at 02:41:49 -

It should work, every browser supports it. It's the way you make the stylesheet, make sure the coding is correct. Internet Explorer can handle screwed up style sheets, that's why I never test in IE

 

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
23rd June, 2005 at 06:12:49 -

Hmm well as I said, for now I think I'll stick with pure HTML, and when I get more confident with CSS I'll redo the website in that. Btw, is there any way to do a decent link system with CSS, like for example, having a link change colour when the mouse hovers over it? I can do that in individual HTML files, but can't figure out if its possible in CSS.

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
23rd June, 2005 at 07:24:51 -

Hmm Circy, you can't do that WITHOUT CSS (well you could do it with JavaScript, but that would be incredibly redundant), so I'm guessing you're confused as to what exactly CSS is. It's not just a stylesheet attached via a link attribute, it can also be embedded into the head of HTML files using the <style> tag (view source of this page to see what I mean). You can even attach it to individual elements (e.g. <h1 style="padding:2px"> ).

To make links change colour you use the :hover psuedoclass. http://www.w3schools.com/css/css_pseudo_classes.asp

If you want different links to be various different colours on hover, you'd do something like this:


<head>
<style type="text/css">
a.bluelink:hover{color: blue}
a.redlink:hover{color: red}
</style>
</head>
<body>
<a href="#" class="bluelink">This will hover blue</a>
<a href="#" class="redlink">This will hover red</a>
</body>


Image Edited by the Author.

 
www.thenatflap.co.uk

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
23rd June, 2005 at 12:05:01 -

I do understand what CSS is, but what Im wondering is if there's a way to do what you just mentioned without embedding it in the HTML document.

 
n/a

Joshua M.



Registered
  01/06/2004
Points
  1999
23rd June, 2005 at 13:18:55 -

Ehm...
I don't think that's possible.
You should take a look at the CSS tutorials on www.w3schools.com , they're really good. I think Pete already posted a link about that, oh well.

 

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
23rd June, 2005 at 14:49:36 -

Oh right, my bad. Yep it's very easy. Just put all your CSS code into a file called "style.css" or something. Then in the <head> of your HTML documents, link to it thusly:

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

 
www.thenatflap.co.uk

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
23rd June, 2005 at 15:37:33 -

I don't think you get what I mean, Pete

Is there a way to use a specific external stylesheet which contains the code you mentioned, eg:

a.bluelink:hover{color: blue}
a.redlink:hover{color: red}

- in an external CSS file? I can do most of the stuff, eg text colours, spacings, fonts in an external CSS file, but have yet to figure out how to do link effects like the one mentioned above.

Image Edited by the Author.

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
23rd June, 2005 at 18:21:18 -

You just whack it in there, it's not "special" or anything. Make sure if you use :hover, :visited etc you put them in the right order as stated on that page I linked to. Otherwise go nuts.

 
www.thenatflap.co.uk
   

Post Reply



 



Advertisement

Worth A Click