Discuss Will a psd turned into CSS scale with text? in the CSS Help forum on Dev Shed. Will a psd turned into CSS scale with text? Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
Posts: 9
Time spent in forums: 3 h 19 m 20 sec
Reputation Power: 0
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?
Posts: 9
Time spent in forums: 3 h 19 m 20 sec
Reputation Power: 0
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
Posts: 19,834
Time spent in forums: 6 Months 1 Day 21 h 3 m 17 sec
Reputation Power: 4192
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.
Posts: 463
Time spent in forums: 2 Weeks 2 Days 7 m 12 sec
Reputation Power: 216
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
Code:
<div class="topboximage"></div>
<div class="middleboximage">
insert your text here
</div>
<div class="bottomboximage"></div>