CSS, max-height

I wish I had something of substance to add today, but I’ve been overwhelmed by personal stuff.  My oldest daughter has been sick with strep for the last week, so I’ve been having to rearrange a lot of my schedule so I can hang out with her when needed.  Consequently, I’m just wiped in the evenings. 

Anyway, you may have noticed that I’ve been playing around with my website, especially with my new blogroll page.  I”ve been adding some blogs to it using RSS feeds, and one thing has become clear: different RSS feeds behave differently when asked to return an item.  For example, some blog postings auto truncate themselves after a few phrases; for example, Brent Ozar:

Brent Ozar

Join Me for Lunch in Chicago on March 23rd - Wed, 01 Feb 2012
On March 23rd, I’ll be the guest of honor at the first SQLFriends Lunch in Chicago.  For just $30, you get lunch at Buca di Beppo on Rush Street plus two hours of talking about SQL, virtualization, blogging, consulting, the MCM program, you name it. And you really do name it – on the SQLFriends...

...
Upcoming free webcasts: SQL Server Certifications, DBA Darwin Awards Index Edition, and Anatomy of the SQL Server Log File.

Contrast this with Andy Warren’s feed:

It Depends (Andy Warren)

Now to End of Year - Fri, 02 Dec 2011

My friend Steve Jones posted Shutting Down for a Week and in that he talked about doing too much, trying to find balance. I’m right there with him, I’ve been slowly finishing up commitments and shedding tasks to get down to what is right now about a 45 hour week, with a single day trip remaining this year and no travel projected for January.

I’m starting to think about next year. How much do I want to travel? What are my new goals? I haven’t been able to get as much done as I wanted this year. I got a lot done, but not as much as I wanted. Trying to do too much, or not trying hard enough? Both? I’ve got a few ideas I think are worth effort, but I’m trying harder to quantify the effort. Building something new is exhilarating, but draining too if you do it on top of a normal job.

Mostly though I’m going to do things that aren’t work or career related. Catch up some stuff around the house, build a thing or two, do some extra reading, and when I’m ready I’ll make some decisions about the next phase.

Now, while I like reading Andy’s stuff, I don’t necessarily want a bunch of lengthy articles on my blogroll page; I tried to figure out a way to limit the amount of text returned, when I tripped across this nifty CSS property: max-height. From DevGuru: The max-height property is used to set the maximum height of an element. Other properties can be used to set the height, width, maximum width, minimum height and the minimum width. This property is not inherited. (note that Devguru also specifies that this property is not currently supported by any browser; it works in IE7. Go figure).

Anyway, I simply add the max-height to my div container wrapped around the feedsnap plugin, and suddenly the RSS feed truncates after a certain pixel height.

<div style=”overflow:hidden;max-height:100px”></div>

It Depends (Andy Warren)

Now to End of Year - Fri, 02 Dec 2011

My friend Steve Jones posted Shutting Down for a Week and in that he talked about doing too much, trying to find balance. I’m right there with him, I’ve been slowly finishing up commitments and shedding tasks to get down to what is right now about a 45 hour week, with a single day trip remaining this year and no travel projected for January.

I’m starting to think about next year. How much do I want to travel? What are my new goals? I haven’t been able to get as much done as I wanted this year. I got a lot done, but not as much as I wanted. Trying to do too much, or not trying hard enough? Both? I’ve got a few ideas I think are worth effort, but I’m trying harder to quantify the effort. Building something new is exhilarating, but draining too if you do it on top of a normal job.

Mostly though I’m going to do things that aren’t work or career related. Catch up some stuff around the house, build a thing or two, do some extra reading, and when I’m ready I’ll make some decisions about the next phase.

 

Anyway, I hope this puts some ideas in your head.

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks

December 16, 2008 · stuart · 3 Comments
Posted in: CSS

3 Responses

  1. Margaret - December 30, 2008

    I think your solution is elegant and useful — as for the different feeds, it’s simply that the one person has his set to “full feeds” and the other has it set to “excerpt”.

    Lot’s of back-and-forth on the value of each setting and it ultimately ends up being a personal choice. Supposedly for SEO, you want full feeds.

    ê¿ê

  2. stuart - December 30, 2008

    Well, that’s useful information to stockpile somewhere ; do you have any idea of where to set that in feedburner, for example?

  3. Margaret - December 30, 2008

    Go to your wordpress dashboard, settings, reading and you’ll see “for each article in a feed show” and radio buttons next to “full” and “summary” — there’s also a setting for how many of the most recent posts to show in the feed.

    ê¿ê

Leave a Reply