0

I'm trying to get my text to be underlined while blinking, but when I follow suggestions from other questions, it still only lets one value work.

I tried

text-decoration: underline;
#text-decoration:blink;
}

I tried

text-decoration: underline, blink

And nothing worked. How can I get the text to blink while underlined? I'm trying everything I can find, but nothing seems to work.

j08691
  • 204,283
  • 31
  • 260
  • 272
Gold Park
  • 9
  • 1
  • Check the syntax of the examples you posted. – j08691 Dec 04 '14 at 16:55
  • As in what? What's wrong with the syntax? I'm new and in Digital Media 1, but my teacher doesn't know how to have 2 values, either. – Gold Park Dec 04 '14 at 17:04
  • You can recreate `blink` using [CSS animations](http://stackoverflow.com/questions/13955163/imitating-a-blink-tag-with-css3-animations), although you almost certainly shouldn't. – Blazemonger Dec 04 '14 at 17:06
  • Why? What would happen? – Gold Park Dec 04 '14 at 17:07
  • Your users would hate you for using it at all. – Blazemonger Dec 04 '14 at 17:12
  • Your first example `text-decoration: underline; #text-decoration:blink; }` is invalid. It should be more like `#someID {text-decoration: underline;}`. And text-decoration doesn't even have a blink value. – j08691 Dec 04 '14 at 17:21

2 Answers2

1

Seperated multiple CSS property values with a space:

p {
    text-decoration: blink underline;
}

Note from W3 spec:

Conforming user agents may simply not blink the text.

George
  • 36,413
  • 9
  • 66
  • 103
0

No you can't. If you define same property several times in a CSS statement, only the last one is used.

And underline and blink are values of the same text-decoration-line property: https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line

Using the hacks will only change behaviour in different browsers. For example, set #text-decoration: blink for IE6 (I suppose) and text-decoration: underline; for all other browsers.

saNs
  • 147
  • 7
  • Ok, but I tried them on one line and it didn't work. – Gold Park Dec 04 '14 at 17:02
  • It doesn't matter if they are on one lines or not. Only the last rule will be used. In your case it's `text-decoration: underline;` as most of browsers wouldn't parse the `#text-decoration:blink;` rule because of syntax error. – saNs Dec 04 '14 at 17:04