PDA

View Full Version : css



Pages : [1] 2

cerin
01-08-2005, 06:49 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head><title>My first styled page</title>
</head>
<style>body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: blue }
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
top: 2em;
left: 1em;
width: 9em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
ul.navbar li {
background: white;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: blue }
a:visited {
color: purple }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }
</style
<body>

<!-- Site navigation menu -->
<ul class="navbar">
<li><a href="index.html">Home page</a>
<li><a href="musings.html">Musings</a>
<li><a href="town.html">My town</a>
<li><a href="links.html">Links</a>
</ul>

<!-- Main content -->
<h1>My first styled page</h1>

<p>Welcome to my styled page!

<p>It lacks images, but at least it has style.
And it has links, even if they don't go
anywhere&hellip;

<p>There should be more here, but I don't know
what yet.
</address>

</body>
</html>

How do I go about putting the nav bar on top and making the boxed links closer together.

Quantrizi
01-08-2005, 07:13 PM
This helps (http://www.google.com), so does this (http://www.w3schools.com), and don't forget this one (http://www.google.com).

cerin
01-08-2005, 07:16 PM
wow thanks!

gcn_zelda
01-08-2005, 07:16 PM
Just because CSS starts with a C doesn't make it a C programming language :P

Google it, by the way.

cerin
01-08-2005, 07:39 PM
who said it makes it c programming?

gcn_zelda
01-08-2005, 07:41 PM
The sarcasm is lost on cerin :rolleyes:

cerin
01-08-2005, 07:43 PM
lololololololololololol try Cascading style sheets

The sarcasm is lost on cerin I guess so

Quantrizi
01-08-2005, 07:44 PM
Ya know, looking at that makes my PHP code look good in some parts (which is bad!), I've noticed something "odd":



body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: blue }

1. What does "11em" in padding-left mean? I've never heard of 11em's of padding. I've heard of 11 pixels (px) and 11 points (pt), but not em.

2. Why is TNR in quotes, but the rest are not?

cerin
01-08-2005, 07:53 PM
no clue

EDIT: if you say so

Quantrizi
01-08-2005, 07:56 PM
no clue
Ya know...one-or-two answer replies are really not worth posting...not to mention a waste of space on the browser window.

Hunter2
01-08-2005, 08:10 PM
Allow me to momentarily hijack this thread. While we were on the topic of annoying embedded sounds (especially mid, which everyone is picking on :() in the other thread, it got me thinking - does that apply to my site as well? It does have a 'stop' button, and offers a choice between 4 mids otherwise, and the controls are easily accessible in the bottom left corner at all times. And the music is dampened to a much lower volume by default.

Quantrizi
01-08-2005, 08:12 PM
Allow me to momentarily hijack this thread. While we were on the topic of annoying embedded sounds (especially mid, which everyone is picking on :() in the other thread, it got me thinking - does that apply to my site as well? It does have a 'stop' button, and offers a choice between 4 mids otherwise, and the controls are easily accessible in the bottom left corner at all times. And the music is dampened to a much lower volume by default.
If the music is stopped by default, than it should be good.

MadCow257
01-08-2005, 08:13 PM
I think if there is music it should not be set to play unless the user presses the play button. There are of course exceptions...

EDIT
Beat me to it

gcn_zelda
01-08-2005, 08:14 PM
It'd be all right with me, if you weren't using frames :P

Kleid-0
01-08-2005, 08:15 PM
1. What does "11em" in padding-left mean? I've never heard of 11em's of padding. I've heard of 11 pixels (px) and 11 points (pt), but not em.

2. Why is TNR in quotes, but the rest are not?
em is just another length unit, just like in and the other two you typed. It's just a matter of preference. You can check out the comparisons Here (http://kb.mozillazine.org/index.phtml?title=Em_units_versus_ex_units)

TNR is in quotes because it has spaces in it. It's customary in CSS to put quotes around fonts that have more than one word. Not only is it probably customary, but probably also more browser portable for browser interpretation.

Quantrizi
01-08-2005, 08:18 PM
em is just another length unit, just like in and the other two you typed. It's just a matter of preference. You can check out the comparisons Here (http://kb.mozillazine.org/index.phtml?title=Em_units_versus_ex_units)

TNR is in quotes because it has spaces in it. It's customary in CSS to put quotes around fonts that have more than one word. Not only is it probably customary, but probably also more browser portable for browser interpretation.
Oh, ok. Thanks much for clarifying them. I just never heard of em before, so hey :)

Kleid-0
01-08-2005, 08:28 PM
Your welcome Quantrizi, I didn't really know what em was at first lol
---

I made a very special webpage for cerin:
http://home.centurytel.net/ravenz/cerin.html

Now cerin, you can go to http://home.centurytel.net/ravenz/ to understand the file structure (not much lol).

Be sure to skim the code on the main page by going something like:
View-->Source on your browser, but I'm sure you already knew that ;) .

btw I copied most of this from:
http://216.203.152.142/

So you can go there if you want to understand this more :)

Brain Cell
01-08-2005, 08:29 PM
lololololololololololol try Cascading style sheets

hmmm .... Laughing out loud out loud out loud out loud out loud out loud out loud out loud out loud out loud out loud??

Quantrizi
01-08-2005, 08:32 PM
hmmm .... Laughing out loud out loud out loud out loud out loud out loud out loud out loud out loud out loud out loud??
Boy...who knew you can lol more than once? Cerin is a god!!!! :rolleyes: ** note: ther cerin is god comment was sarcasm...Cerin!... **

cerin
01-09-2005, 12:03 AM
Thanks for the page Kleid-o. I got 100% on the w3c html xhtml and css quizzes. Should I try and take the exam?

Kleid-0
01-09-2005, 12:10 AM
Take as many quizes/exams as you can, be sure to ask here if you have any questions on the concepts of what's going on. Remember google is always your friend for reference needs (and popular questions), just go like this on google:
CSS (anyquestionaboutcss)
And you're golden. CSS references are very rich on Google...if only C Programming solutions were as rich, :( , though C++...ok getting off topic lol.

cerin
01-09-2005, 12:19 AM
You have to pay a small fee for that one its from w3c and if you pass they send you a certificate if you get above 95% you get something extra on the certificate. It's over the fundamentals of html, xhtml, and css.

Kleid-0
01-09-2005, 10:28 AM
Well don't pay for them! ack! lol. Just read tutorials in place of it I suppose. I wouldn't ever recommend having to pay for an exam, make your own exams in JavaScript and quiz yourself on yourself lol. That always works pretty good after reading a tutorial on something that you didn't know beforehand.

sean
01-09-2005, 10:42 AM
What are you going to do? Certify yourself?

edit:

That would go down real well in a job interview.

"It says here you're certified to dismantle Nuclear Weapons?"

"Yes sir. I even programmed the quiz myself, in Perl."

kermit
01-09-2005, 10:51 AM
well hey, if you can program Perl, you can dismantle nukes..

;)

sean
01-09-2005, 10:53 AM
Well anybody can dismantle nukes. The tricky part is doing it slowly.

axon
01-09-2005, 11:13 AM
>>well hey, if you can program Perl, you can dismantle nukes..<<

*goes looking for -Ken-*

is it true o master of the perl?

Zach L.
01-09-2005, 11:16 AM
Well anybody can dismantle nukes. The tricky part is doing it slowly.
You mean a sledge hammer doesn't work? :confused:

cerin
01-09-2005, 11:24 AM
Its a test over html xhtml and css. They mail you a certificate if you pass 70%. The certificate is from w3c so it has gotta be worth something right?

Kleid-0
01-09-2005, 11:35 AM
I really doubt it, if you showed that in your resume, you'd probably get laughed at..but you could brag to your friends!

Zach L.
01-09-2005, 11:35 AM
Personally, I wouldn't bother. If you are just going to be making your own website (i.e. not being hired by someone), then no one will care if you have the certificate so long as it looks good and works.

algi
01-09-2005, 12:51 PM
yeah hunter the music on your site is low, about a month ago I was on it and I kept hearing weird sounds that i thought was one of my other computers, I turned up the volume on my speekers (it was really low,) and realised it was your website

Hunter2
01-09-2005, 01:18 PM
Hmm.. weird sounds. Guess that sort of defeats the purpose :D I turned the volume down on purpose so that it wouldn't be super annoying, but maybe I overdid it.. btw, is anyone using firefox? For some reason the music works in IE but not in FireFox for me. Anyone have the same problem?

cerin
01-09-2005, 02:10 PM
If its embed it tells me I need to install the missing plugin apple quicktime.

B0bDole
01-09-2005, 02:19 PM
>The price for the exam is $59 (U.S.) - payable with PayPal or a valid credit card at the time you register.

Waste of money

Quantrizi
01-09-2005, 02:20 PM
>The price for the exam is $59 (U.S.) - payable with PayPal or a valid credit card at the time you register.

Waste of money
That is correct.

If you really want a VALID computer certificate, go for A+, Novell, or some other one that actually matters.

Hunter2
01-09-2005, 02:26 PM
>>If its embed it tells me I need to install the missing plugin apple quicktime.
It's not embedded; it's the bgsound property (attribute? whatever you call it) in the body tag of an HTML file in an iframe in a frame.

Kleid-0
01-09-2005, 02:44 PM
I checked out the source, and I found this:

http://kevklam.galacvalley.com/bgm/bgm1.html So I went there, and found this in that source file:

<BGSOUND SRC="bg1.mid" LOOP="infinite" VOLUME="-2500"> So then I went

http://kevklam.galacvalley.com/bgm/bgm1.mid The file didn't exist! So I went:

http://kevklam.galacvalley.com/bgm1.mid But that file doesn't exist either! I don't think mozilla can find the midi file anywhere. Because I hear no sound :( Where is the midi located? Because if the midi exists:

http://kevklam.galacvalley.com/bgm/music/bg1.mid Then you could go like this:

<BGSOUND SRC="/bgm/music/bg1.mid" LOOP="infinite" VOLUME="-2500">

Kleid-0
01-09-2005, 03:15 PM
Ack my bad:

http://kevklam.galacvalley.com/bgm/bg1.mid Does exist lol
http://www.codingforums.com/showthread.php?p=196583 (http://www.codingforums.com/showthread.php?p=196583) a discussion about music on pages for Mozilla. You seem to need a plugin. Perhaps you could try a flash music player?

This doesn't work btw:

<html>
<head>
<BGSOUND SRC="bg1.mid" LOOP="infinite">
<object data="bg1.mid" codetype="audio/mid"> </object>
<embed src="bg1.mid" autostart="true" loop="true" width="2" height="0">
</embed>
</head>

<body>
Enjoy!
<body>
</html> :(

B0bDole
01-09-2005, 03:19 PM
music on websites is just bad design

Zach L.
01-09-2005, 03:33 PM
music on websites is just bad design
Indeed... I usually have my own music playing on my computer, and that just conflicts. Additionally, the likelihood that people want to hear what you do is not particularly high (perhaps they want to hear nothing). Anyway, the only time I expect/tolerate music on a website is in a flash movie/game/whatever, as long as I clicked on a link consciously knowing that it would (probably) have music associated with it.

Hunter2
01-09-2005, 04:56 PM
>>Then you could go like this:
That's how it was when I put it together; I suspect the server automatically changed it when I uploaded the files.

>>Perhaps you could try a flash music player?
I have zero knowledge about anything flash :(

>>This doesn't work btw:
Hmm? What's the idea behind that snippet? Looks to me like it would just have the same mid playing 3 at a time..


Indeed... I usually have my own music playing on my computer, and that just conflicts. Additionally, the likelihood that people want to hear what you do is not particularly high (perhaps they want to hear nothing). Anyway, the only time I expect/tolerate music on a website is in a flash movie/game/whatever, as long as I clicked on a link consciously knowing that it would (probably) have music associated with it.I see. I'll make the music stopped by default in my next update then. Funny how everyone hates web music though; I usually find it quite pleasant :p Maybe it's just because I never have music playing to conflict with it.

Kleid-0
01-09-2005, 05:01 PM
>>Then you could go like this:
That's how it was when I put it together; I suspect the server automatically changed it when I uploaded the files.

>>Perhaps you could try a flash music player?
I have zero knowledge about anything flash :(

>>This doesn't work btw:
Hmm? What's the idea behind that snippet? Looks to me like it would just have the same mid playing 3 at a time..
>>Then you could go like this:
That's how it was when I put it together; I suspect the server automatically changed it when I uploaded the files.
Well know the server was correct I was wrong, I mistyped the midi location.

>>Perhaps you could try a flash music player?
I have zero knowledge about anything flash :(
It's easy if you have Flash MX, after of course downloading an already made flash music player :).

>>This doesn't work btw:
Hmm? What's the idea behind that snippet? Looks to me like it would just have the same mid playing 3 at a time..
What I meant was that nothing with background music works on mozilla/firefox :( Only IE, our hero! lol

Hunter2
01-09-2005, 05:20 PM
I see. Well, I suppose anyone who wants to hear web music will download the plugin on their own. In the meantime, I've updated my site to have the music stopped by default:


(mus.html)
<iframe src="bgm/bgm1.html" ... >
vvv
<iframe src="bgm/bgmstop.html" ... >

*upload*
:D I love this whole object-oriented HTML deal.

**EDIT**
:o Odd. Seems it didn't update, even though it works fine on my local copy and I clearly uploaded/overwrote all the mus.html's.

**EDIT2**
Ok, it did update - just that for some reason Mozilla decided to use the cached version of the site even though I hit refresh several times, clicking in every frame.

Quantrizi
01-09-2005, 05:26 PM
I see. Well, I suppose anyone who wants to hear web music will download the plugin on their own. In the meantime, I've updated my site to have the music stopped by default:


(mus.html)
<iframe src="bgm/bgm1.html" ... >
vvv
<iframe src="bgm/bgmstop.html" ... >

*upload*
:D I love this whole object-oriented HTML deal.
You know there is an attribute fo the music embed tag that allows it to be stopped by default...right?

Search for it on any HTML tutorial website...they should have it.

Hunter2
01-09-2005, 05:32 PM
Right, but embed objects stick annoying, ugly (and inconsistant) music player windows onto the site, which takes up a lot more room than the small corner that I've allocated for the musicbox. Also, the BGSOUND tag allows you to modify the volume, which I really like.

Kleid-0
01-09-2005, 05:46 PM
If you're still interested in flash music, you could get some cool loops from:
FlashKit.com (http://www.flashkit.com/loops/)
And a open source flash player here:
Editable Flash Player (http://www.jeroenwijering.com/?scr=list)
Then all you would need to do is get someone with FlashMX, open the .fla file (Flash document), and then right-click on the already running mp3, and change it to any mp3 you want! It's not as hard as you think! It'll be fun :), a good experience.

B0bDole
01-09-2005, 07:07 PM
>Right, but embed objects stick annoying, ugly (and inconsistant) music player windows onto the site,

I think there's an attribute to turn that off by default too

Thantos
01-09-2005, 07:12 PM
>Right, but embed objects stick annoying, ugly (and inconsistant) music player windows onto the site,

I think there's an attribute to turn that off by default too
There is, its called: <do not put embedded music in your site>

Hunter2
01-09-2005, 08:11 PM
Not even when turned off by default?