Skip to main content

Setting column width, not minimum column width

I've been working on a web page formatted for iPhone, and in this context the width of the page and the content on the page, is very important. First of all you don't want the page to be too wide, because then the text might be too small to read. But you also want the entire page to fit within the width of the screen, because no-one wants to have to scroll from side to side when reading lines of text.

So, of course, you can use a table and specify the width of cells and table, but this actually sets the minimum width - if the content is wider than the specified width, then the cell or table will expand to suit. In my case it is a long string of continuous text without spaces in, specifically a long URL.

I'm sure the wiser ones of you reading this will already be thinking CSS. Indeed, it gave me the answer. Specifically, CSS version 3, which is not supported on all browsers. Luckily iPhone's Safari browser is one of the few browsers that does support CSS3.

The answer came from searching for how to force text to wrap to a specific width, i.e. <p style="width: 900px; word-wrap: break-word"> which I found from this page:

http://www.velocityreviews.com/forums/t373091-wrap-long-url-in-table.html

Comments

Popular posts from this blog

Selecting Full on this computer may result in degraded video playback

When I attempt to import Full 1920x1080 video into iMovie '08 on my MacBook, it tells me "Selecting Full on this computer may result in degraded video playback". It doesn't tell me, however, what I can do about it. Is it the CPU? The graphics card? RAM? The slower Firewire 400? Is there a list of Mac models that can support full 1080 resolution? Do I need to switch to Final Cut? There is a discussion on the Apple Support forums, but no answer yet...

Understanding Website Speed metrics in 5 minutes

Do you think your website might be slow? Do you think this could be affecting your eCommerce conversion rate? Maybe you’ve read somewhere that web pages should load faster than 3 seconds, and yet when you look in your Google Analytics it’s telling you that Averages Page Load Times are over 10 seconds… that means your website is too slow, right? Well, maybe… but maybe you’re being misled by confusing metrics and benchmarks. This video will help you to quickly understand the difference between these confusing terms used by techies and consultants. It will help you to decide, which ones are important to you, and what is a reasonable benchmark, for the ones you care about. Thanks for watching! And if you want to find out how you can speed up YOUR website, you can get in touch with me via Twitter  @simon_toon or LinkedIn