![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In article <ZPw_a.56801$Ne.28257@fed1read03> in comp.infosystems.www.authoring.stylesheets, George Ziniewicz zin1 (AT) cox (DOT) net> wrote: In particular, I still use a table to provide for a centered image in a few slideshows (though table vertical align doesn't work in Mozilla): I don't understand this statement. I use vertical-align all the time in tables, and it seems to work just fine in Mozilla 1.4 as it did in 1.2. Have you tried validating your HTML and your CSS? |
| http://zintel.com/homepics.html Your "CSS version" of Rocky Point did not work at all for me -- perhaps because when I view source it was full of Javascript. |
|
If you're going to link to a JavaScript version and a CSS version of the same thing, it seems a bit much to have JavaScript in both! |
#3
| |||
| |||
|
|
I try to use CSS when possible, though I am still learning and don't maximize its use. In particular, I still use a table to provide for a centered image in a few slideshows (though table vertical align doesn't work in Mozilla): http://zintel.com/homepics.html I've used combinations of <center>, style align 'center', table cell align, valign and height='100%' to get what I want, but I wonder if CSS can do it by itself. I've tried CSS to align images centrally along the horizontal and vertical but get nowhere vertically, should that be possible (I assume I could do it with a fetch of pic width and height and absolute positioning, but it seems I should let the browser do that with a style align property) What would be the best way to align an image horizontally and vertically within the available windowspace using CSS? |
#4
| |||
| |||
|
|
"George Ziniewicz" <zin1 (AT) cox (DOT) net> schreef in bericht news:ZPw_a.56801$Ne.28257 (AT) fed1read03 (DOT) .. I try to use CSS when possible, though I am still learning and don't maximize its use. In particular, I still use a table to provide for a centered image in a few slideshows (though table vertical align doesn't work in Mozilla): http://zintel.com/homepics.html I've used combinations of <center>, style align 'center', table cell align, valign and height='100%' to get what I want, but I wonder if CSS can do it by itself. I've tried CSS to align images centrally along the horizontal and vertical but get nowhere vertically, should that be possible (I assume I could do it with a fetch of pic width and height and absolute positioning, but it seems I should let the browser do that with a style align property) What would be the best way to align an image horizontally and vertically within the available windowspace using CSS? In alt.html was a thread with subject 'center vertical', starting on 9-8-2003. The answer to your question is in the end of it, with an example: http://karlcore.com/100pcttable/100pctcsswithdtd.php Hope this helps, |
#5
| |||
| |||
|
|
"Els" <els.aNOSPAM (AT) PLEASEtiscali (DOT) nl> wrote in message news:bhgqao$ch9$1 (AT) reader1 (DOT) tiscali.nl... "George Ziniewicz" <zin1 (AT) cox (DOT) net> schreef in bericht news:ZPw_a.56801$Ne.28257 (AT) fed1read03 (DOT) .. I try to use CSS when possible, though I am still learning and don't maximize its use. What would be the best way to align an image horizontally and vertically within the available windowspace using CSS? In alt.html was a thread with subject 'center vertical', starting on 9-8-2003. The answer to your question is in the end of it, with an example: http://karlcore.com/100pcttable/100pctcsswithdtd.php Thanks! I was using table align attributes, and all it really required was a style height attribute, somehow I missed that. table border='1' style='width:100%; height:100%;' tr td align='center' img src='aCentered.jpg' /td /tr |
#6
| |||
| |||
|
|
"George Ziniewicz": "Els": "George Ziniewicz": What would be the best way to align an image horizontally and vertically within the available windowspace using CSS? http://karlcore.com/100pcttable/100pctcsswithdtd.php Thanks! I was using table align attributes, and all it really required was a style height attribute, somehow I missed that. No, you need to do more: put a height: 100% style attribute to html and body as well! Try it: if you take out the height: 100% from the body, Mozilla and Netscape won't display a full height table, Mine does, unless you mean an older rev. |
|
if you take out the height: 100% from the html, none of the browsers will display a full height table, Mine do. Frustrating for someone trying to learn... Using just a table style, this works on my IE5, Netscape 7.1 and Mozilla 1.4 |
|
My initial problem seems to be not trying the style height and width 100%. With CSS it seems best to minimize use of HTML positioning attributes. Things get wierder and wierder. Though the above code works on its own for me, incorporating it into my larger slideshow program doesn't, going back to the simple case of an image in a table I noticed the simple inclusion of a div changed vertical alignment. Investigating it showed that the weblink article described what I ultimately had to do: go 100% style:height on html, body, and table. This stuff is quirky! This finally worked on both IE & Mozilla at least: style type='text/css' html{height:100%;} body{background:#111111; height:100%;} table{width:100%; height:100%;} /style . . . table border='0' tr><td align='center' img src='centeredPic.jpg' name='pic' id='pic' /td></tr /table Don't know why the table centering doesn't work in a div, |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Well, tables are comparatively easy to deal with. But how can I center an image vertically in, say, a div? I wish I knew ![]() |
#9
| |||
| |||
|
|
"Thomas Mlynarczyk" <blue_elephant55 (AT) hotmail (DOT) com> schreef in bericht news:bhja5g$lvo$04$1 (AT) news (DOT) t-online.com... [Vertical centering in tables] Well, tables are comparatively easy to deal with. But how can I center an image vertically in, say, a div? Curious, Thomas I wish I knew ![]() |
#10
| ||||
| ||||
|
|
Also sprach Els: Well, tables are comparatively easy to deal with. But how can I center an image vertically in, say, a div? I wish I knew ![]() Would something like "line-height:100%" work? |
|
Also, I think there is something like "display:table-cell" (don't remember the correct syntax) which should make "vertical-align:middle" work, |
|
but it's not for older browsers. |
|
So, does this mean the people who invented CSS simply forgot to implement such a basic feature? |
![]() |
| Thread Tools | |
| Display Modes | |
| |