March 6th, 2013, 06:07 PM
Will a psd turned into CSS scale with text?
A thought crossed my mind. I plan on creating the web design for a site im developing in photoshop. A major part of my website uses unordered lists. The data in these lists can vary in by a decent amount. Is there a way to make the list able to scale with the amount of text, or enclose the text regardless?
March 6th, 2013, 08:05 PM
What you are asking in not entirely clear. However, I'll remind you that it's best to avoid setting a fixed height on elements that contain text.
The best web designs adapt to font-size and content length changes as well as different viewport sizes.
March 6th, 2013, 08:35 PM
Sorry for the lack of information, I'll try and elaborate.
What I want to do in psd is create a custom unordered list. In this custom list, I want every list item to have their own "box". So in photoshop, I want to create something simular to a facebook news feed, where every feed has its own "box". Another good example is textsfromlastnightDOTcom, where they have every item in the list has its own section when it is displayed on page.
If created a simple box and psd and converted it to be included in css, is there a way to have the box scale to the size of the text inside it. From my understanding when I use psd, it will use that as an image in css. I'm just worried that the boxes will not scale to the amount of text.
If this is still vague please let me know, and I will try to add more information
March 6th, 2013, 09:44 PM
Ah. Well it depends on how you implement it. There are several ways. These days it's often best to use as much CSS3 (e.g. border-radius and box-shadow) and as few images as possible, but you could use a technique like this one: CSS teaser box revisited For the images you do use for that, it's best to use optimized PNGs.
Comments on this post
March 6th, 2013, 09:48 PM
TO convert a box from psd to a variable height html/css layout, you will need to save the top slice of the box, the bottom slice of the box, and a horizontal width slice of the middle section.
Then, you create your html/css pretty much like this
insert your text here
<!-- Your CSS -->
March 6th, 2013, 10:20 PM
@DonR That's one way to do a fixed width box. However, I don't recommend it. Instead I recommend you check out the example I linked to.