textfiled link textdecoration html 5

  • Hi,

    is it right that we can not set textdecorations for html 5???

    like this doesn't work

    Code
    <data name="textcss">
    	p{color:#FFFFFF; font-family:Arial; font-size:16; font-weight:bold;  text-align:center; }
    	a       { color:#FFFFFF; font-family:Arial; font-size:16; font-weight:bold;  text-align:center; text-decoration:none; }
    	a:hover { color:#FF0000; font-family:Arial; font-size:16; font-weight:bold;  text-align:center; text-decoration:none; }
    </data>

    it seems that text-align:centre; does not work..

    Code
    <data name="textcss2">
    	a {   color:#FFFFFF;  font-family:Arial;  font-size:14px;  font-weight:bold;  text-align:center;   text-decoration:none; }
    </data>


    Tuur *thumbsup*

  • Hi,

    the reason is the way html works (but please don't compare with the buggy and limited Flash html rendering ):
    the <a> element is an 'inline-element' and is only as width as its content is, therefore centering itself inside itself doesn't have much effect,

    by using/adding this css code to the <a> css style code:

    Code
    display:block; width:100%;

    the <a> element will be rendered with 100% width of the parent element and then centering the text inside it will work.

    Best regards,
    Klaus

  • Hi Tuur,
    Looks like you and I are barking up the same tree. I just spent part of my evening working out classes to enhance some company docs in my product tour. Basically just like you have laid out, but with classes instead of specific tag attributes. When I set html5="prefer" or used my ipad, everything went to default black fonts and tiny text :( Was looking great with Flash.

    Wish I knew a way to handle this for html5 ATM. Looks like I'll need to make a separate setup.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!