Frage

I need to change the word "comment" to "Sign the Guestbook" on my Squarespace blog. The support team said I could do this through CSS but they couldn't offer any further help with this "advanced modification." All help is appreciated. Thanks a lot guys. -Dan

War es hilfreich?

Lösung

There isn't really a nice way to do this with CSS, but it can be done.

Let's say you have the following markup:

<span>Comment</span>

Adding a psuedo-element with :after will produce something like "CommentSign the Guestbook":

span:after { content: "Sign the Guestbook"; }

Then you can hide the actual text and reposition the replacement text:

span {
  display:inline-block;
  text-indent:-9999px;
}
span:after {
  content: "Sign the Guestbook";
  margin-left:9999px;
}

It's not perfect, and it's better to just change the actual text. Replace span with the element that has the text, and reduce the margin-left by the amount you suspect the original text takes up. You could also use a background image with the desired text, but that's kind of a pain and harder to edit.

Demo: http://jsfiddle.net/zjrSj/1/

Andere Tipps

Open up your HTML/PHP file and change it to Sign the Guestbook. You can't do it in CSS unless you do some bizarre thing. If this doesn't help you, then please post your code so I can manually help you.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top