Log in

View Full Version : New to CSS



andy99
04-25-2007, 03:12 PM
Hi

I am new to CSS, I have found this site very interesting.

I would like to know where the CSS example code on the site is put in the HTML page? in the "head" or the "body".

I was trying this one: http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-horizontal/

I can get the menu to appear but not the sub menu's?

is there a "newbie" guide to CSS?

I am using Dreamweaver V8


thanks

boogyman
04-25-2007, 03:20 PM
there are 3 places to put a css script

1. Inline

<div style="background-color: #000000">

2. Embedded - anywhere in the page, however it is suggested that its done in the head tag


<head>

<style type="text/css">
<!--
body {
background-color: #000000;
}
// -->
</style>

</head>


3. Linked - done in the head tag


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


if you are using IEv6 or before then you need a Javascript effect because the :hover property is not supported by browsers before v7 of IE

and as for a place to learn w3schools.com (http://www.w3schools.com)

I am hoping that you are using the coding section rather than design view?

andy99
04-25-2007, 03:27 PM
great thanks for your help, I will give that a go.
I am using the "split" view in DW8.

with Win XP Pro and IE7

djr33
04-25-2007, 08:11 PM
I think split is a good way to go. You can learn what code is made and learn what it does visually. It's also faster than just coding, but allows you to keep an eye on it, because coe usually goes wrong after a while.

As for XP and IE7.... well.... those are fine... for you. But other people use different systems (vista, mac, linux), (IE6, FF, Opera, Safari, etc.), and you should remember that it must work in those as well. You may be aware of this, but it can't hurt to mention it.
With the example of :hover, that will ONLY work in IE7 or above (and other browsers), so though you can see it, it won't do any good for those with IE6, so you must consider them and code your page so it works there too, unless you just don't care if they can see it in which case maybe it would be ok, like if you are making a webpage for just yourself.
Usually, though, maximizing compatibility is one of the most important and hardest parts of web design.

andy99
04-26-2007, 09:13 AM
ok thanks, I have Firefox installed as well, the websites will be viewed by everyone so I guess I will have to go for Compatibility, I do not have a computer here with IE6, so I am not sure how I will test that, although I know DW8 does have some Compatibility tools built in. I have also visited
w3schools.com and looked at some examples of style sheets, plus some here, it is beggining to make sense! thanks.