A Conversation for The H2G2 Programmers' Corner

Not an arithmetic problem

Post 21

Pirate Alexander LeGray

No, I did it. But that nice cube was accidental, can't seem to do it again. I like to put logo's on just about everything, and the only logo I could come up with was the name of the site.smiley - artist


Not an arithmetic problem

Post 22

Pirate Alexander LeGray

I can't understand the following CSS, I've seen this sort of thing used before...




div.img
{ I understand div.img ok
margin: 2px;
border: 1px solid #0000ff;
height: auto;
width: auto;
float: left;
text-align: center;
}
div.img img
{ but what does this mean
display: inline;
margin: 3px;
border: 1px solid #ffffff;
}
div.img a:hover img
{ AND WORSE whats this?
border: 1px solid #0000ff;
}
div.desc
{
text-align: center;
font-weight: normal;
width: 120px;
margin: 2px;
}

---------------------------------------------------------------------







Add a description of the image here





Add a description of the image here





Add a description of the image here





Add a description of the image here




Not an arithmetic problem

Post 23

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

"div.img img
{ but what does this mean"

The first block, "div.img", gives attributes that will be applied to "div"s with a class of "img".

The next block, that you ask about, gives attributes that will be applied both to those "div"s and to "img" tags - it's called "cascading", hence "cascading style sheets".

For example,


div.fred {
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacemargin: 10px;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spaceborder: 0px;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacefont-face: courier;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - space}

div.fred, div.jim {
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacecolor: red;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacetext-decoration: none;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - space}


Is identical to:


div.fred {
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacemargin: 10px;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spaceborder: 0px;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacefont-face: courier;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacecolor: red;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacetext-decoration: none;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - space}

div.jim {
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacecolor: red;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacetext-decoration: none;
smiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - spacesmiley - space}


...but the former takes slightly less typing.


Not an arithmetic problem

Post 24

Pirate Alexander LeGray

My security didn't say a dickybird on install of this browser, and it aint disabled anything yet either. My modem is working faster, I can't believe how different it is.

How come the inventer of the pc can't make a browser work properly, it took ages to install IE7 and if IE7 didn't cause the security to try to stop the download, it would have installed in 30 secs.

Thanks to you and the other chap for suggesting the Wiki where I could see IE7 not working for myselfsmiley - tasmiley - artist


Not an arithmetic problem

Post 25

Pirate Alexander LeGray

Yes but, theirs no commas in the W3Cschools.com code.

p.img a:hover<--no comma-->img {}

smiley - erm


Not an arithmetic problem

Post 26

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

The commas are optional; I put them in for the sake of clarity.


Not an arithmetic problem

Post 27

Pirate Alexander LeGray

I'm completely confused now, Firefox sees yesterdays page no updates and doesn't appear to recognise colgroup, IE sees today's page but with errors.

I think this web-page idea not so good nowsmiley - bigeyes


Not an arithmetic problem

Post 28

Pirate Alexander LeGray

Is HTTP.com part of Firefox? Because I keep getting redirected to it.


Not an arithmetic problem

Post 29

Pirate Alexander LeGray

I've got this file in _r and if you hover over its address its address runs off the screen, starting with AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
This can't be right can it? smiley - ermsmiley - artist


Not an arithmetic problem

Post 30

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

No; it's just that Firefox interprets typos differently from IE. If you accidentally type a space after "http" Firefox will put in the ".com" for you. smiley - geek


Not an arithmetic problem

Post 31

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

Gee, thanks. Now we have to scroll right for the rest of this page. smiley - headhurts

(And I have no idea...)


Not an arithmetic problem

Post 32

Pirate Alexander LeGray

Oh no, I've sent a report about the site, pressing on the home page button got me the site, must have left a space and will go and have a look.smiley - ta


Not an arithmetic problem

Post 33

Pirate Alexander LeGray

Sorry, I thought it wrapped roundsmiley - erm


Not an arithmetic problem

Post 34

Pirate Alexander LeGray

Couldn't see the space, but works ok now after having CCleaner get rid of everything and RegCure clean my registry and Kasperski do a deep scan, which it is still doing from last night.smiley - smiley


Not an arithmetic problem

Post 35

Pirate Alexander LeGray

One thing that is harder about CSS than say fortran, is that you can make errors that are ignored. So you don't know you made them. I included cellspacing and font-face and align in my CSS which were all wrong. CSS is not HTML although instructed that it is just an extention.

The only way I found out about this was through firefox tools, oh and one of my gif's is blocked by google, couldn't be that one I lifted cut cropped and completely changed the colours of could it?

Is colgroup depreciated, the left column is supposed to be blue?


Not an arithmetic problem

Post 36

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

http://www.velocityreviews.com/forums/t155426-colgroup-and-css.html

Ain't Google wonderful... smiley - tongueout


Not an arithmetic problem

Post 37

Pirate Alexander LeGray

Yeh google is amazingsmiley - smiley but my colgroup
is inline, in the table. I only use it to
specify color, so don't see the point of
putting it in style.

I been trying to use hover to make invisible
blocks visible today, and guess what it didn't
work.

So I went to this chaps site who gave me the idea
in the first place, the one that showed up IE,
and firefox didn't see the site either.smiley - biggrin

http://www.syntacticweb.co.uk/cssd/

So what plugin do I have to get to make firefox
work.smiley - ta


Not an arithmetic problem

Post 38

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

I think he's used some IE-specific code on the page. Which is odd, if you read his section on choosing a browser...

http://www.syntacticweb.co.uk/browsers.htmsmiley - spacesmiley - evilgrin


Not an arithmetic problem

Post 39

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

It's not IE-specific; it just doesn't seem to work in Firefox 2. smiley - blush

Have a look at the page in Opera and everything works as described.

Ah well, roll on Firefox 3... smiley - geek


Not an arithmetic problem

Post 40

Pirate Alexander LeGray

I've had a look at that page, and he doesn't explain
that SP2 is an all night downloadsmiley - silly

and I was given NET Framework 3.0 with service pack
1a, I don't know if I needed it because I don't know
what it is. I do know its an alnight download though.

So what is the uncompressed size of Operasmiley - smiley


Key: Complain about this post

Not an arithmetic problem

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more