Re: [WSG] Vertical align text middle no work?

2003-12-18 Thread Vaska/WSG

yes, that would work great, however...i can't force the height (sorry i
didn't mention this previously) because it will wonk up another div where
the height is being set by javascript to fill all the available space in the
window it can (minus the top div height of course)...

what i have done, was set the "topthing" height to a pixel value, set a top
padding amount and left ample room at the bottom of the div just in case
somebody text zooms to 200%...not really how i wanted to solve this, but
simple is better than not...

and so far, it seems to be testing very well in every browser this way...i
can live with it if i have to...

thanks for your input...vaska


> 
> Hi
> 
> vertical-align doesn't really work the way valign in a table cell works
> - it applies to inline elements and table cell elements only (see css2
> rec 10.8.1).
> 
> You have to approach the matter from the other way, remove the table
> layout hat and put on a box model hat :
> 
> 
>  hi i'm top thing text!
> 
> 
> 
> #topthing
> {
> width : auto;
> }
> 
> .dudewheresmyboxmodel
> {
> /* t r b l */
> margin : 30px 0px 30px 0px;
> padding : 2px;
> }
> 
> so this will align your text to the 'middle' of #topthing. In reality
> it's the text forcing the 'height' of the topthing up and down - so it
> looks like you have middle aligned text
> 
> HTH
> 
> james
> 
>> 
>>  
>> 
> 
> 
> *
> The discussion list for http://webstandardsgroup.org/
> *
> 
> 
> 

-- 


*
The discussion list for http://webstandardsgroup.org/
* 



Re: [WSG] Vertical align text middle no work?

2003-12-18 Thread James Ellis
Hi

vertical-align doesn't really work the way valign in a table cell works  
- it applies to inline elements and table cell elements only (see css2 
rec 10.8.1).

You have to approach the matter from the other way, remove the table 
layout hat and put on a box model hat :


  hi i'm top thing text!


#topthing
{
 width : auto;
}
.dudewheresmyboxmodel
{
 /* t r b l */
 margin : 30px 0px 30px 0px;
 padding : 2px;
}
so this will align your text to the 'middle' of #topthing. In reality 
it's the text forcing the 'height' of the topthing up and down - so it 
looks like you have middle aligned text

HTH

james

 



*
The discussion list for http://webstandardsgroup.org/
* 



[WSG] Vertical align text middle no work?

2003-12-18 Thread Vaska/WSG

Hi all,

I'm feeling quite stuipd because I can't seem to get...

#topthing {
width: auto;
height: 33px;
vertical-align: middle;
}

The title

to work.  The text isn't aligning in the middle of the div, it goes to the
top.  Anybody got any ideas - after a nice reading around the web I just
fine solutions using tables and that's not in my plan (I hope).

Thanks...vaska

*
The discussion list for http://webstandardsgroup.org/
*