09 August, 2014

Columns side-by-side or stacked -- CSS to adjust for screen width

I recently had to brush up on my CSS skills to develop a solution where two buttons would appear side-by-side unless the view port was less than 480 pixels, in which case they should then display stacked. Through a bit of research I found a couple of solutions. When I tried to implement the solutions as presented, the buttons didn't appear side-by-side, but instead on separate rows -- I'm sure something I must of overlooked, but nevertheless I therefore came up with my own modified solution.

My particular example used 3 columns -- the middle just for space, which could be done with padding and/or margin. The key is using "@media." By default the widths of the columns were all set for 100% -- configured for stacking. When the screen was 480 pixels or larger, using "@media" the widths are adjusted 45%, 10%, and 45%. If you're not sure what each of these CSS properties do for you, try searching "css [property]" such as "css clear" and click on the link for w3schools -- usually the first or second response.

This should be enough to get you going. Depending on your use you may need to do further work, so when you;re on the 480+ pixel screen, you're not consuming all available width.

Class definitions

.mySection {
clear: both;
padding: 0px;
margin: 0px;
zoom:1; /* For IE 6/7 */
}

.mySection:before {
content:"";
display:table;
}
.mySection:after {
content:"";
display:table;
clear:both;
}

.myGroup {
display: block;
}

.grid_1of3, .grid_2of3, .grid_3of3 {
width:100%;
}

.grid_2of3 {
height:10px;
}

@media only screen and (min-width: 480px) {
.myGroup {
display: inline;
}

.grid_1of3,
.grid_3of3 {
width:45%;
}

.grid_2of3 {
width:10%;
}
}


HTML code

<div class="mySection" style="text-align:center;">
        <div class="myGroup grid_1of3"><img src="first_btn.png" border="0" /></div>
        <div class="myGroup grid_2of3"> </div>
        <div class="myGroup grid_3of3">< img src="second_btn.png" border="0" /></div>
</div>

16 June, 2014

Comcast will use your service to offer WiFi to other customers

Yes, you heard that right! If you're a Comcast customer and you rent a cable internet modem from them, then it has a separate wireless channel that other Comcast customers can use. This means as a Comcast customer, you can surf the Internet from any neighborhood where Comcast has an install base.

While in theory I like the flexibility as a Comcast customer to get WiFi anywhere (Xfinity WiFi Hotspots), in practice I'm not too pleased.

Why I'm not pleased.

  • I pay Comcast to have their Internet service, which enables this capability.
  • I pay another $8 to rent their modem, which is also required for this capability.
  • I was never asked; my account was opted-in.
  • If I have an issue with my connection, I have to hold a long time (typically), and if something is wrong at my end, I have to pay for them to correct, yet again Comcast benefits from my service working.
  • If you live in an apartment complex, Comcast advertises your apartment complex on the list of available hotspots (mine shows up).
  • Unless you have Comcast, if you want more than the guest pass allows (see below), Comcast is making money from this service, yet isn't passing it back to its customers that make it possible.
  • It has the potential to slow down connectivity for all of us on the same Comcast Headend. Note, it shouldn't slow you down specifically, unless the headend itself is congested. Comcast claims a separate 6 Mhz channel is used.
There may be another benefit beyond flexibility for you. If you have friends and relatives visiting, and they're Comcast customers, they can use for free and not consume your data -- it seems Comcast caps data at 250 GB per month. If your friends or family don't have Comcast, they can still use it as a guess, twice for up to an hour in a 30 day period.

What can we do about it?

  • Dump Comcast. I know this can be difficult, because for most of us the only other option is a much slower DSL connection.
  • Replace the Comcast modem (more info here and here) with one of your own.
  • Figure out how to opt-out -- I looked through my account options and couldn't find it.
  • Write Comcast and your congressman. This of course is a slow process, but worth doing.
  • If you're not already rebooting your cable modem on a frequent basis like I am, do it just for fun and kick-off anyone who might be connected. Also be sure to turn it off when you're not at home.

If Comcast was to make a few changes, I might be more amenable.

  • Ask me -- no auto-opt-in.
  • Offer me free onsite service -- if the service is failing for me, it's also failing for any other Comcast customer who wants to use the service via my rented modem.
  • Ah, rented huh? The modem should not have a rental fee.
I don't think any of these things are unreasonable, yet when you're already recognized as one of the worst companies to do business with and you have a virtual monopoly, Comcast has no incentive to be reasonable.



22 May, 2014

Firefox Status Bar gone missing? Let's bring it back!

With the release of Firefox 29, the Status Bar work-around no longer worked. I don't recall when it stopped displaying, but now there's no option. I found a handy add-on that brings back the Status Bar, Status-4-Evar, so my other add-ons display again.


20 March, 2014

Remove all hyperlinks within Excel

Ever copy a webpage of data into Excel, and it brings along a bunch of hyperlinks? Of course it isn't practical to remove each hyperlink manually. Fortunately there are a couple of options to perform a bulk removal of hyperlinks.
Note that I'm using Excel 2007 in my examples.

OPTION 1

  1. Select the cells that contain hyperlinks.
  2. On the Home tab, in the Editing section, click the Clear drop-down arrow.
  3. Click Clear Hyperlinks.
I have found in some cases that the Clear Hyperlinks option isn't available. In those cases, use option 2 below.

OPTION 2

Use the following macro:
Sub NoMoreHyperlinks()
ActiveSheet.Hyperlinks.Delete
End Sub
For those of us that need a reminder on how to create macros, here's a more detailed process.
  1. Press Alt-F8 to display the Macro dialog box
  2. Enter a new macro name (such as "NoMoreHyperlinks") in the text box just below "Macro name:"
    - This will change the Create button from an inactive to active state
    - If you already have one or more macro, the name of one may already be in the "Macro name:" text box. That's ok, just type over it and Excel will realize you're wanting to create a new macro.
  3. Click Create -- this opens the Visual Basic Editor
  4. Copy the lines above and paste into the edit window
    - Note if you didn't use "NoMoreHyperlinks" as a name, you will need to make sure you update the macro code accordingly
  5. Close the editor window -- you should be back on your worksheet
  6. Press Alt-F8 again
  7. Select your new macro and click Run -- all your objects should now be deleted from your worksheet
 That's it!