Archive for the ‘Call for help’ Category

CSS “TOC” style?

Thursday, March 8th, 2007

I’m just curious… is there a fancy way to do something like this in CSS:

Introduction …………… Page 1
Information ……………. Page 2
More Info ……………… Page 3

… where the “Page” text lines up and the “…..” just fills in until it reaches the “Page” text… kind of like you’d see in a table of contents in a book? (Ideally the “….” wouldn’t even be text in the markup. It would just be a background fill or something…) Is that even possible?

Update: Jenna got me on the right track…. (Thank you!) :D

Make each line part of a list item. Apply the background image to <li> style. Wrap each part with another tag. Float one right, the other left, and give them both a solid color background the same as the rest of the page (so that it covers the dot, so it won’t show through under the text). I also wanted the right column to line up, so I gave it a width, and told the text to align-left. Here’s the example.

Firefox underlining images

Wednesday, February 21st, 2007

Someone help me out before I go crazy.
Why is firefox underlining the image in this example?
Here is a screenshot (in case you’re not using firefox) - the above link looks like this in firefox:
weird underline in firefox

The code on that page is simply:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
a img {
text-decoration: none;
border: none;
}
-->
</style>
</head>
<body>
<a href="#"><img src="gecko.gif" alt="gecko" /> Test</a><br />
<a href="#"><img src="gecko.gif" alt="gecko" /></a> <a href="#">Test</a>
</body>
</html>

I thought it might be a doctype issue - but changing it doesn’t seem to make a difference.

Added after: Just to make this even more mysterious… This DOES NOT create that line:
<a href="#"><img src="gecko.gif" alt="gecko" /> </a>
It doesn’t show up until we add a *character* within the <a> tag that the underline pops up…(I’ve updated the example to show this…)

Updated 3/30/07 Shaun wins the prize for finding the solution!:a img {
display:block;
border: none;
float: left;
}

The example has been updated…

Tools for Web Development on the Mac?

Thursday, December 9th, 2004

The last time I did any extensive web dev on the mac was about… oh, maybe SIX! years ago. Eek, I feel old. In any case, I’ve been doing everything on the PC since then, and while I have a number of really great tools on the PC that I like, I’m clueless when it comes to mac tools.

On the PC, the tool that I use the most is Dreamweaver. Not so much for it’s “WYSIWYG” feature, that doesn’t work too well for me, but it does auto-complete HTML tags, it knows php functions and can tell me what data types I have to pass in, does code highlighting. I even use it to make my stylesheets, because I can get it to pull up the “correct” way to write out a style definition if I forget (which is often).

So what tools do I need to do development on the Mac? I’ve downloaded a trial copy of Westciv Stylemaster which seems to give me what I need for writing stylesheets. I have BBEdit, but it doesn’t do the auto-complete stuff like dreamweaver does (of if it DOES, I can’t find it!).

Cany anyone make some recomendations? (Post in the comments please)

Sticky Posts in WordPress

Monday, September 27th, 2004

I’m trying to create a sticky post (as in, make one post stay on top above “newer” posts - until I indicate otherwise)

Previously, I had blogged this link on Weblog Tools Collection - I now notice there is an update post which points you to oomsonline to these instructions. However upon reading in the instructions that it required a manual edit to the database (and I was in a lazy mood) I decided to look further.

On the wiki I found a link here on the wp support boards which linked to another type of plugin. I gave it a try - but ran into problems. (it simply didn’t seem to work)

Then I found “Adhesive” which I also tried, but ran into problems. (It creates a checkbox that you check if you want it to be sticky - however, I would check the checkbox, and it wouldn’t stay checked after I saved my changes.)

Granted - I suspect at least SOME of these problems may be in part because my index.php page is heavily customized. Aside from the confusion of the multiple plugins/hacks that seem to do the same thing - are there others out there that have had better success? Is the first one to weblogtoolscollection reliable enough that it’s worth the manual change to the database?

UPDATE: Not quite sure what was going on before - but Adhesive suddenly started to work for me. And I’m very happy with it. :D

mySQL statements - order by and group by

Friday, November 15th, 2002

Anyone out there know mySQL really well? I understand what order by does, and I understand what group by does. Can these two be used together? If so, how does it work? Does it group stuff together and then WITHIN the groups do the order_by? ie. If we had a database of people’s info - and we did:

SELECT lastname, age FROM people GROUP BY lastname ORDER BY age DESC

would it list the the youngest to oldest people with the same last name - and then move onto the next group of lastnames, etc.? Would that be sorting the last names arbitrarily? If you wanted to sort the last names *reverse* alphabetically as well would you do this?:

SELECT lastname, age FROM people GROUP BY lastname ORDER BY lastname ASC, age DESC

Actually re-reading the GROUP BY descriptiong… maybe I DON’T understand GROUP BY… =sigh= anyone wanna help explain?