Keyword

text-align

  • Martin Thorgaard
  • Martin Thorgaard's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 8 months ago #124435 by Martin Thorgaard
text-align was created by Martin Thorgaard
Im trying to center the created date (CatItemDateCreated) above my categori items listings.
I found where it is in k2.css, but i cant figure out how to center the date.
(I guess its done in k2.css and not in category_item.php)

This is what it says in k2.css:

div.catItemHeader span.catItemDateCreated {color:#999;font-size:11px}

So I was thinking I could change to this:

div.catItemHeader span.catItemDateCreated {color:#999;font-size:11px;text-align:center;}

But nothing happens. I also tried using float, but I guess this is for objects.
As you probalby can see, im a beginner in CSS, but I really try to fix it for myself, to learn it.
This time I've used aprox. 2 hours try to figure this out, but I can't solve this by myself.

Can anyone give me a hand here?

Sincerely,
Martin

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #124436 by Yiota
Replied by Yiota on topic Re: text-align
The how you will handle things with K2 mostly depends on your template.

You can add
div.catItemHeader span.catItemDateCreated {display:block; color:#999; font-size:11px; text-align:center;}
in your k2.css file and if that is what you need.

Please Log in or Create an account to join the conversation.

  • Martin Thorgaard
  • Martin Thorgaard's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 8 months ago #124437 by Martin Thorgaard
Replied by Martin Thorgaard on topic Re: text-align
Thanks alot, it worked :)

Maybe you cant point something out for me, so I can learn from it, and not just copy from you:

Why did I had to ADD your line in the k2.ccs and not just edit the line I found, before it would work?


Sincerely,
Martin

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #124438 by Yiota
Replied by Yiota on topic Re: text-align
Maybe I phrased it wrong. You could just add the display:block in the same block you have found earlier and added the text-align:center; yourself. It's the same css statement.

Please Log in or Create an account to join the conversation.

  • Martin Thorgaard
  • Martin Thorgaard's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 8 months ago #124439 by Martin Thorgaard
Replied by Martin Thorgaard on topic Re: text-align
Just me being to fast, I couldnt get it to work by edit the line at first.
And then I tried to add another line with the phrase you said, and then it worked.

Presume I updated the screen before it was saved firmly.

Just did as you said, and it worked, so thanks :)


Sincerely,
Martin

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #124440 by Yiota
Replied by Yiota on topic Re: text-align
You are welcome!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum