RE: [WSG] PHP Standards

2008-05-18 Thread Michael MD

The php site - php.net
is always a good place to start for php

There are often some good snippets to be found in user comments too 

Its not as good as it was a couple of years ago though, as they seem to have
removed a lot of useful stuff that you could do in pure php because they can
now be done by extensions (often needing php to be recompiled to install -
very annoying!)

Still a good place to start though...






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Centering all items in a li

2008-05-18 Thread Stuart Foulstone

I seem to remember someone in a previous thread, about similar problem,
suggested using,

display: table-cell;
vertical-align: middle;


On Sat, May 17, 2008 3:39 pm, Darren Lovelock wrote:
 Hi list,

 I've been trying to find a solution that will allow me to vertically
 center
 all the items in a li.

 The big problems i've got are that the li's are a non-fixed height and are
 floating to the left.

 So that kills the negative
 http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
 positioning
 method and the table-cell
 http://www.w3.org/Style/Examples/007/center#vertical  methods that I've
 found whilst scouring the web.

 Does anyone know a method that I can use that doesn't involve using
 tables?

 Any help will be greatly appreciated!

 Regards,

 Darren Lovelock
 Munky Online Web Design
 http://www.munkyonline.co.uk http://www.munkyonline.co.uk/
 T: +44 (0)20-8816-8893



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Centering all items in a li

2008-05-18 Thread Darren Lovelock
Thanks, but as I said, that doesn't work in this case because the li is
floating. 

Also I think it is dependant on the the li having a set height value which I
cant do either.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Stuart Foulstone
Sent: 18 May 2008 10:01
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Centering all items in a li


I seem to remember someone in a previous thread, about similar problem,
suggested using,

display: table-cell;
vertical-align: middle;


On Sat, May 17, 2008 3:39 pm, Darren Lovelock wrote:
 Hi list,

 I've been trying to find a solution that will allow me to vertically 
 center all the items in a li.

 The big problems i've got are that the li's are a non-fixed height and 
 are floating to the left.

 So that kills the negative
 http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
 positioning
 method and the table-cell
 http://www.w3.org/Style/Examples/007/center#vertical  methods that 
 I've found whilst scouring the web.

 Does anyone know a method that I can use that doesn't involve using 
 tables?

 Any help will be greatly appreciated!

 Regards,

 Darren Lovelock
 Munky Online Web Design
 http://www.munkyonline.co.uk http://www.munkyonline.co.uk/
 T: +44 (0)20-8816-8893



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Centering all items in a li

2008-05-18 Thread Matt Fellows
Shouldn't have to set a height, the line will wrap automatically
(unless you specify not to).

 Thanks, but as I said, that doesn't work in this case because the li is
 floating.

Do the li's have to float?

On Sun, May 18, 2008 at 8:49 PM, Darren Lovelock [EMAIL PROTECTED] wrote:
 Thanks, but as I said, that doesn't work in this case because the li is
 floating.

 Also I think it is dependant on the the li having a set height value which I
 cant do either.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Stuart Foulstone
 Sent: 18 May 2008 10:01
 To: wsg@webstandardsgroup.org
 Subject: Re: [WSG] Centering all items in a li


 I seem to remember someone in a previous thread, about similar problem,
 suggested using,

 display: table-cell;
 vertical-align: middle;


 On Sat, May 17, 2008 3:39 pm, Darren Lovelock wrote:
 Hi list,

 I've been trying to find a solution that will allow me to vertically
 center all the items in a li.

 The big problems i've got are that the li's are a non-fixed height and
 are floating to the left.

 So that kills the negative
 http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
 positioning
 method and the table-cell
 http://www.w3.org/Style/Examples/007/center#vertical  methods that
 I've found whilst scouring the web.

 Does anyone know a method that I can use that doesn't involve using
 tables?

 Any help will be greatly appreciated!

 Regards,

 Darren Lovelock
 Munky Online Web Design
 http://www.munkyonline.co.uk http://www.munkyonline.co.uk/
 T: +44 (0)20-8816-8893



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***




 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***





-- 
Matt Fellows
http://www.onegeek.com.au/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Centering all items in a li

2008-05-18 Thread Darren Lovelock
Hi Matt, 

No worries. Still missing it though! Text-align:center will align the
elements horizontally centered.

I want to align the elements INSIDE the li to be vertically centered to the
height of the li. 
So there is an even space above and below each of the elements inside the
li. At the moment they are sticking close to the top of the li.  

I cant use a top margin because the list is used more than once in the page
and the li's each have different heights. % value for margin-top seem to use
the document height and not the height of the li.

Basically I want to achieve the same effect as valign: middle in a table
cell.

I just can find a logical solution that will work with a non-fixed height
container.

It's looking to me like it cant be done without a table!

I wonder if there is a way of doing this with javascript?

Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Fellows
Sent: 18 May 2008 02:58
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Centering all items in a li

Sorry Darren - it was late an i was tired! Vertical/Horizontal,
Left/Right...

I don't think there is a need to do anything too exciting, the container of
the list should just need a text-align:center.
Is this basically what you are after? I have made the div only 300px wide so
you get the wrapping effect which I think is what is causing the grief.

div.container{text-align:center; width:300px} div.container ol
li{list-style-type:none; }

div class=container
ol
   li class=elem
   label for=dnameDisplay Name:/label
   input type=text id=dname class=tinput /
   /li
   li class=desc
   pInformation about preview box etc. If it is more than two
lines or ## characters link to./p
   spana href=learn more/a/span
   /li
/ol
/div

The list items will be centered. If you have multiple columns you can just
place them next to each other.
Or am i still missing something?

--
Matt Fellows
http://www.onegeek.com.au/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Centering all items in a li

2008-05-18 Thread Matt Fellows
lol I think I will leave this one alone, I think i'm making you're job
more difficult instead of the other way around!

Please do send through your solution when you find it so I can have
that 'light bulb' moment.

Cheers,

-- 
Matt Fellows
http://www.onegeek.com.au/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Centering all items in a li

2008-05-18 Thread Rahul Gonsalves

Darren,

On 17-May-08, at 8:09 PM, Darren Lovelock wrote:

I've been trying to find a solution that will allow me to vertically  
center all the items in a li. The big problems i've got are that the  
li's are a non-fixed height and are floating to the left.


A link to a stripped down test would be helpful.

However, if you can't post a link, perhaps one of the links below will  
be helpful to you?


Best,
 - Rahul.

[1] http://www.brunildo.org/test/
[2] http://www.brunildo.org/test/vertmiddle.html
[3] http://www.brunildo.org/test/valimid2.html
[4] http://www.brunildo.org/test/va_lineheight.html


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Centering all items in a li

2008-05-18 Thread Darren Lovelock
Yeah it is a bit of a tricky one lol! 

Looks like this is one example where tables are better for layout! 

Thanks very much for taking a look though :)

Darren 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Fellows
Sent: 18 May 2008 13:09
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Centering all items in a li

lol I think I will leave this one alone, I think i'm making you're job more
difficult instead of the other way around!

Please do send through your solution when you find it so I can have that
'light bulb' moment.

Cheers,

--
Matt Fellows
http://www.onegeek.com.au/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Centering all items in a li

2008-05-18 Thread Viable Design
Darren,

Try assigning a line-height and a height to the li, and make the two the
same.

Jo

On Sun, May 18, 2008 at 8:54 AM, Darren Lovelock [EMAIL PROTECTED]
wrote:

 Yeah it is a bit of a tricky one lol!

 Looks like this is one example where tables are better for layout!

 Thanks very much for taking a look though :)

 Darren

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Matt Fellows
 Sent: 18 May 2008 13:09
 To: wsg@webstandardsgroup.org
 Subject: Re: [WSG] Centering all items in a li

 lol I think I will leave this one alone, I think i'm making you're job more
 difficult instead of the other way around!

 Please do send through your solution when you find it so I can have that
 'light bulb' moment.

 Cheers,

 --
 Matt Fellows
 http://www.onegeek.com.au/


 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] Centering all items in a li

2008-05-18 Thread Matijs
Sounds like you can only change the CSS and not the (x)HTML, is that
correct?

You're also floating the li's... that puts them behind eachother right?
Would displaying them inline help?

On Sun, May 18, 2008 at 3:24 PM, Viable Design [EMAIL PROTECTED]
wrote:

 Darren,

 Try assigning a line-height and a height to the li, and make the two the
 same.

 Jo


 On Sun, May 18, 2008 at 8:54 AM, Darren Lovelock [EMAIL PROTECTED]
 wrote:

 Yeah it is a bit of a tricky one lol!

 Looks like this is one example where tables are better for layout!

 Thanks very much for taking a look though :)

 Darren

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Matt Fellows
 Sent: 18 May 2008 13:09
 To: wsg@webstandardsgroup.org
 Subject: Re: [WSG] Centering all items in a li

 lol I think I will leave this one alone, I think i'm making you're job
 more
 difficult instead of the other way around!

 Please do send through your solution when you find it so I can have that
 'light bulb' moment.

 Cheers,

 --
 Matt Fellows
 http://www.onegeek.com.au/


 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***



 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

RE: [WSG] Centering all items in a li

2008-05-18 Thread Darren Lovelock
Cant set a height on the li, tried it though to see what would happen and it
didnt work. Playing with line-height isnt the right way to fix this.
 
Thanks anyway.

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Viable Design
Sent: 18 May 2008 14:24
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Centering all items in a li


Darren,

Try assigning a line-height and a height to the li, and make the two the
same.

Jo


On Sun, May 18, 2008 at 8:54 AM, Darren Lovelock [EMAIL PROTECTED]
wrote:


Yeah it is a bit of a tricky one lol!

Looks like this is one example where tables are better for layout!

Thanks very much for taking a look though :)

Darren


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Fellows

Sent: 18 May 2008 13:09
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Centering all items in a li


lol I think I will leave this one alone, I think i'm making you're job more
difficult instead of the other way around!

Please do send through your solution when you find it so I can have that
'light bulb' moment.

Cheers,

--
Matt Fellows
http://www.onegeek.com.au/


***

List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

RE: [WSG] Centering all items in a li

2008-05-18 Thread Darren Lovelock
Here's a example of what I'm doing http://www.munkyonline.co.uk/test.html

I want the li's to behave the same as table cells set with valign:middle.

I've had to float the li's left instead of displaying them inline otherwise
they stack on top of each other in a mess!

I suppose looking at it I could have used divs instead of a list but either
way, I think it will still behave the same.

Cheers,

Darren


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rahul Gonsalves
Sent: 18 May 2008 13:46
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Centering all items in a li

Darren,

On 17-May-08, at 8:09 PM, Darren Lovelock wrote:

 I've been trying to find a solution that will allow me to vertically 
 center all the items in a li. The big problems i've got are that the 
 li's are a non-fixed height and are floating to the left.

A link to a stripped down test would be helpful.

However, if you can't post a link, perhaps one of the links below will be
helpful to you?

Best,
  - Rahul.

[1] http://www.brunildo.org/test/
[2] http://www.brunildo.org/test/vertmiddle.html
[3] http://www.brunildo.org/test/valimid2.html
[4] http://www.brunildo.org/test/va_lineheight.html


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***