Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-31 01:42:34

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Help with a couple small issues with images and font sizes

The site is <a href=“http://www.kentuckygolfing.com”>Kentucky Golfing</a>

1. The little icons I’ve got for “continue reading” and “comments” for each article are just hard coded into the form using the “img src” tag. This is the code I’m using:

<code>
<h1><txp:permlink><txp:title /></txp:permlink></h1>
<span class=“comment_time”><txp:posted /></span>
<txp:if_excerpt>
<p class=“body”><txp:excerpt /></p>
<p><txp:permlink>Continue Reading</txp:permlink>&nbsp;<img src=”/images/continuereadingicon.gif” /> <txp:comments_invite />&nbsp;<img src=”/images/commentsicon.gif” /></p>
<txp:else />
<p class=“body”><txp:body /></p>
<txp:comments_invite wraptag=“p” />
</txp:if_excerpt>
<br />
</code>
<br />
You can see that the icons are placed on the right side of the text “comments” and “continue reading”. Is there anyway to duplicate this using background images in the CSS for the icons instead of just having it coded in the html using the “img src” tag? The code just looks messy to me. I see that “comments” is automatically assigned a class (where I could use a bg image in the CSS), but I didn’t see any for “continue reading”.

2. If you view the first article in the list and scroll down to the comments, you can see the font size is extremely small. I cannot figure out where it’s getting its size from? I don’t know is TXP is giving it the size automatically or what? Nothing in the CSS is specifying a size that small? What could I be overlooking here?

3. Last thing that I’m curious about right now is, is it possible to change the site template when articles are clicked? So like, on the front page I’m going to have the article titles, and an excerpt. Once the article title is clicked I’d like the template to be a little different rather than just loading up in the “left-content” side of the page. Is this possible?

Thanks in advance.

Last edited by deronsizemore (2006-07-31 01:43:17)

Offline

#2 2006-07-31 02:54:38

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: Help with a couple small issues with images and font sizes

1) You could create a css class with the right background image for your icons and their related text and apply it to an enclosing SPAN or DIV.

2) On the text size you have used a base size of font-size: medium; (somewhat ambiguous) which depends on the browser and whatever it has set as a default font. You then have #left-content and #right-content use 75% of medium, and #middle-content and #footer use 70% of medium. That’s getting fairly small. You would likely be better of with a fixed value as your base font size (eg 10,12,14,16 px) and use ems/% from there.

3) Yes you can create a new page template and then specify that the article section use it to show your articles rather than the default page.


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#3 2006-07-31 13:19:49

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Help with a couple small issues with images and font sizes

Figured it out!

Thanks

Last edited by deronsizemore (2006-07-31 22:51:32)

Offline

Board footer

Powered by FluxBB