Hi, just a couple of quick questions. I'm new to all of this and I'm trying to pick it up as I go along. I've been using dreamweaver to do my css, now I'm want to do it myself 'cos it looks quite simple.
1, Do I just define each style like this in my notepad?
.text {font-size: 12pt;}
Obviously adding what ever I need in the brackets. I've seen it written with the brackets on different lines?
2, when I do body and p can I just define it once seeing as I want them the same?
3, Do I only need to put things like font-weight: normal? Wouldn't it be normal anyway?
4, Can I apply two classes to something?
And finally is there a simple way to create a solid 1px black border and a slight "drop shodow" to the bottom right of my site?
1: yes...after the semi-colon you can put it on a new line or put it all in 1 line.. i prefer to do all the attributes on seperates lines so its ez to edit when i come back to it...
2: you should get in a habit of using <p> and <hx's> instead of just text.. so you would just set the background and margins or whatever you need for the body and set the p and hx's up differently depending on what you need..
3: if nothing is changing u dont need to set it..only set the font-weight if its gonna be different than the default...
4: i dont know why u would want to do this.. if you put ur <p>'s in <div>'s you can set a style to the div and the paragraph..i do that a lot for different effects...theres a lot of different styles and different methods to do this stuff...best bet is to read a lot of tutorials or books and practice...
and finally ..if i understand the question correctly this would be the code..
border-top: 1px solid black;
border-left: 1px solid black;
border-bottom: 3px solid black;
border-right: 3px solid black;
thats a very basic drop shadow ..ur better off using graphics and other css features..
i hope this helps and isnt too confusing
Are you saying don't define the <body> just the <p> and <hx's>? What's <hx's>? I'm guessing you mean h1, h2, h3, etc.
You're not goning to like the next bit but... shock horror... I'm using tables! I don't get the whole <div> thing yet. I'm just using CSS for as much as I can ie, colours, fonts etc. My defence is that it's my first time. I'm just learning everything and as soon as I've got it all up and running I can concentrate on redoing it! (my head is too full of ideas at the moment to be learning any more!)
I've already tried the border you describe but I didn't look that convincing. What are these other CSS feature you talk of?
im saying dont set fonts and text attributes w/ body...
when i make a css file it normally starts like this
html, body{margin: 0px; padding: 0px;}
p{font: verdana; color: #fff;}
h1{text-decoration: underline;}
h2{...}
h3{...}
then the div's or tables...and if any p needs different attributes ill set a class on that p...like this..
p.highlight:first-letter{font-size: 30px;}
..i hope this kinda clarifies things for you..
the border thing can look very good on smaller objects such as pictures..another way to do it..altho i wouldnt...would be to set 2 divs on top of eachother...and but a shadow graphic on the bottom 1...u dont know how to do that yet so i'd just forget the drop shadow for now..gl
Bookmarks