Jump to content

How to style first word or first 5 letters


newcoder1010
 Share

Recommended Posts

First of all, they are NOT defined as class names with '.'

Second: '.views-field-title' is defined as child element if a space exists between previous class name.

Third: Have you tried nth-bugsbunny its has just as much chance as the non existing nth-letter psuedo property working.

You have to wrap the word with a inline element such as span, b, i element with class name, then style that class name to what you want.

The only one existing is a:first-letter.

You could also use

.views-field.views-field-title a:before {

content: "minus "; display: inline; color: lime ;

}

Edited by dsonesuk
Link to comment
Share on other sites

I need to do some study.  I can have title without the word minus. Luckily I can modify the title. After that, I will have a:before to include minus as content so that I can style the word minus. This will do the trick. However, I cant modify the title for other blocks. For that, I need to do some study to see how to style the first few letters or the first word. 

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...