html - vertical centering child divs relating parent divs backward compatible with old browser using css -
I have a question ... IE 8 is the basic browser for XP and even the banks and other places Also there are even more options today ... My question is related to css3 which allows to do more sexy coding with small efforts ... there is a useful way to replace css3 transform Could? Probably usable in IE 8+ ... My code only works on modern browsers ... Transformation on IE 8 did not work since Microsoft css3 missing feature ...
< Code> & lt; Div class = "main-box" & gt; & Lt; Div class = "headline" style = "width: 60%" & gt; & Lt; Div class = "align-me" & gt; & Lt; Span class = "align-txt" & gt; Example 1 - Line 1 & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "headline" style = "width: 40%" & gt; & Lt; Div class = "align-me" & gt; & Lt; Span class = "align-txt" & gt; Example 2 - Line 1 & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "clustered" & gt; & Lt; / Div & gt; & Lt; Div class = "div-bar" & gt; & Lt; / Div & gt; & Lt; Div class = "headline" style = "width: 60%" & gt; & Lt; Div class = "align-me" & gt; & Lt; Span class = "align-txt" & gt; Example 1 - Line 2 & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "headline" style = "width: 40%" & gt; & Lt; Div class = "align-me" & gt; & Lt; Span class = "align-txt" & gt; Example 2 - Line 2 & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "clustered" & gt; & Lt; / Div & gt; & Lt; / Div & gt;
This is my CSS:
.main-box {background: # F5F5F5; Limit: # 6666 FF1 PX solid; Width: 95%; Padding: 0; Margin: 0 auto; Display: Table; }. Main-line {font-family: werdana, Geneva, without-serif; Font-size: 12px; Font style: normal; Line-height: Normal; Font weight: normal; Font-type: normal; Color: # 000080; Padding-top: 5px; Padding-down: 5px; Exhibit: Table-Cell; Minimum height: 40px; Vertical-row: middle; Swim left; } .align-me {display: table-cell; Vertical-row: middle; Swim left; Border: 1px solid red; Minimum height: 40px; } .align-txt {font-family: Verdana, Geneva, without-serif; Font-size: 12px; Font style: normal; Line-height: Normal; Font weight: normal; Font-type: normal; Color: # 000080; Vertical-row: middle; Swim left; Text Align: Justify; }. Main line {status: relative; } .align-me, .align-txt {status: complete; Top: 50%; Left: 50%; Width: 98%; Webkit-Conversion: Translation (-50%, -50%); -MOZ-TRANSFORM: Translation (-50%, -50%); -o-conversion: translation (-50%, -50%); -mms-conversion: translation (-50%, -50%); Conversions: Translation (-50%, -50%); } .align-me .srtgs {margin: 0; } .cleardiv {Clear: Both; } .div-bar {border-top: 1px solid green; } Here's a demo:
Perhaps other CSS solutions that become iridescent if IE 8 is detected?
Comments
Post a Comment