Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-05 Thread Ed Seehouse
On 3/4/07, Chris Chen <[EMAIL PROTECTED]> wrote: > >The modern way to do this, since a menu (even a horizontal one) is > >just a list of links, is to use the UL element as the wrapper. The > >anchors then go in the LI elements within. See for example the> >Listamatic > >site at http://css.maxdes

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-05 Thread david
Chris Chen wrote: >> [snip] There are prettier ways to do it >> too, if you're worried about your source looking nice. One way that I >> use is: >> >>FooBar > > That's neat. Could you advise why this comment trick work, and how > widely does it work across browsers? Don't know about that,

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-05 Thread Kenny Graham
> That's neat. Could you advise why this comment trick work, and how widely > does it work across browsers? It should work in all browsers. As for how it works, you know how if you have something like: Foo Bar in your HTML, it will render as Foo Bar, and not FooBar? It reduces multi

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-05 Thread Chris Chen
[snip] There are prettier ways to do it too, if you're worried about your source looking nice. One way that I use is: FooBar That's neat. Could you advise why this comment trick work, and how widely does it work across browsers? Thanks, Chris __

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-05 Thread Chris Chen
>There's nothing ugly at all about making anchors display as blocks. >Changing an element's display type is no worse than changing its font >or borders. Remember, (x)HTML is for describing the content, and CSS >is for presenting it. If it's a link, it should be marked up as a >link, not as a div

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-05 Thread Kenny Graham
> The ugly part is to force to a block. I might as well replace with a > truely block element and change to use scripting to handle the visual cue > change / click, but that would seem overkill for a simple task like this. Is > there a strong opposition to to the way I use above for this task?

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-05 Thread Kenny Graham
> One caveat is that inlined > introduced an unknown fixed padding that I have to compensate for via > experiment (since I need to center the list in the middle). This is IE7. I'm pretty sure what you're seeing is actually a space (as in space bar). Foo Bar IE renders the new line characters be

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-04 Thread Chris Chen
The modern way to do this, since a menu (even a horizontal one) is just a list of links, is to use the UL element as the wrapper. The anchors then go in the LI elements within. See for example the Listamatic site at http://css.maxdesign.com.au/listamatic/ COOL! I am happily switching + inline

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-04 Thread Ed Seehouse
On 3/4/07, Chris Chen <[EMAIL PROTECTED]> wrote: > > > Whatever reason is the span there for? There's nothing you can do with > >that construction that you can't do with just the link. > > This is for a horizontal navigation bar centered on the top of the page. The modern way to do this, since a

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-04 Thread Chris Chen
I just realized I only need one level of here to achieve what I want. Chris > > Whatever reason is the span there for? There's nothing you can do with >that > > construction that you can't do with just the link. This is for a horizontal navigation bar centered on the top of the page. > > >

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-04 Thread Chris Chen
> > Whatever reason is the span there for? There's nothing you can do with >that > > construction that you can't do with just the link. This is for a horizontal navigation bar centered on the top of the page. > > >To add to that, if you want to adjust the vertical alignment within a block >of

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-03 Thread David Hucklesby
On Fri, 02 Mar 2007 15:03:01 -0800, Chris Chen wrote: > Hi, > > I can't seem to be able to style inside to make it centered > *vertically* > inside . > > http://www.msn.com"; >Hello > On Sat, 3 Mar 2007 12:31:04 -0800, Ed Seehouse replied: > Whatever reason is the span there for? There's nothi

Re: [css-d] What's the proper way to vertically center an element within its parent?

2007-03-03 Thread Ed Seehouse
On 3/2/07, Chris Chen <[EMAIL PROTECTED]> wrote: > I can't seem to be able to style inside to make it centered > *vertically* inside . Both of these elements are inline so the only things you can adjust are the line height and the font size. If you must for some reason adjust them vertically t

[css-d] What's the proper way to vertically center an element within its parent?

2007-03-02 Thread Chris Chen
Hi, I can't seem to be able to style inside to make it centered *vertically* inside . http://www.msn.com"; >Hello Is there a general CSS solution for this (other than "position: relative/absolute") that works on other elements as well? Thanks, Chris _