|
|
wbmkk
regular
Reg'd: Tue
Posts: 218
Loc: Whitley Bay, UK
|
|
Hi
I am currently learning HTML and CSS and have come up with a problem
I was putting attributes to a classes, including top-margin and overflow
Initially I just put them at the bottom of the class attribute list, ie just before the closing }
They didn't work, so I stuck them on the first two lines, after the opening {
Everything works
So, there must be a set order for CSS tags to be put ...
Is this true and if so, where could I find a list of this ?
Mann thanks !!!
|
|
ianm
regular
Reg'd: Fri
Posts: 371
Loc: Colchester
|
|
In theory you can have them in any order you like, if 2 of them clash that could cause a problem but when things dont work always check the css does validate http://jigsaw.w3.org/css-validator/#validate_by_input or if you post your html and css maybe someone can see the issue.
Cheers
|
wbmkk
regular
Reg'd: Tue
Posts: 218
Loc: Whitley Bay, UK
|
|
I found the problem
I had missed out a semicolon at the end and it was affecting both lines
I fixed that problem, then tried again, putting the properties in different orders and it worked every time
Regards !
|
Dunx
regular
Reg'd: Tue
Posts: 169
|
|
Quote:
... I had missed out a semicolon at the end and it was affecting both lines ...
That is so easy to do. You do not need the semi-colon on the end of the last attribute in the list, but I always put one there in case I add something later, saves a lot of head scratching.
All the best - Duncan
-------------------- bolitho
council house exchange
|
|
|