/    Sign up×
Community /Pin to ProfileBookmark

How to create the css for this graphic

Hi, I need to create css using the attached graphic, can anyone tell me the best way to go about it and how to slice it up?

I need to the div to expand vertically depending upo howmuch text is in there.

Thankyou

[upl-file uuid=ba86497c-6fdf-4f78-94a6-4939629d1ce2 size=7kB]webtocss.jpg[/upl-file]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@apegApr 22.2010 — Vertical is easy, there are probably better ways to do this but this will probably be the easiest:

[CODE] <style type="text/css">
.constant {
background-repeat:repeat-y;
background-attachment: scroll;
background-position: top center;
background-image:url(images/-CENTER SLICE-);
}
#container {
width:585px;
padding:0px;
margin:0px;
}
#roof {
background-image:url(images/-TOP SLICE-);
height:-HEIGHT OF TOP SLICE-px;
background-repeat:no-repeat;
}
#content_floor {
background-image:url(images/-BOTTOM SLICE-);
background-repeat:no-repeat;
background-position:bottom center;
}
</style>
<div id='container' class='constant'>
<div id='roof' class='constant'></div>
<div id='content_floor' class='constant'>
put your content here
</div>
</div>[/CODE]


-aPeg
Copy linkTweet thisAlerts:
@tirnaApr 26.2010 — This code will create a box that is automatically expandable in both the X and Y directions depending on the content.

The background is a 4 sided border with rounded corners.

I have attached the 2 background image slices the box uses.

[code=php]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fluid Box</title>
<style type="text/css">
<!--

.container {
width: 200px;
color: rgb(0,0,255);
background: url("roundedRight.jpg") top right no-repeat}
.container a {
font-size: 12pt}

.desc {
font-size: 18pt;
margin: 0px 0px 0px 0px;
padding: 20px 0px 0px 20px;
background: url("roundedLeft.jpg") top left no-repeat}

.link {
margin: 0px 0px 0px 0px;
padding: 20px 0px 0px 20px;
background: url("roundedLeft.jpg") bottom left no-repeat}

.link div {
display: block;
padding: 0px 20px 20px 0px;
font-style: normal;
background: url("roundedRight.jpg") bottom right no-repeat}

-->
</style>

</head>
<body>

<div class="container">
<div class="desc">This box is:</div>
<div class="link">
<div>
<a href="#">Indestructable</a><br />because it is expandable both X and Y directions.
<p>Even more text<p>
<p>Some paragraph text</p>
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
</div>
</div>
</div>

</body>
</html>
[/code]


[upl-file uuid=c4be8217-1aa0-4efc-8606-913aaa548e6f size=3kB]roundedLeft.jpg[/upl-file]

[upl-file uuid=06583e74-58ba-4b77-9e97-b6b53aafa4e3 size=9kB]roundedRight.jpg[/upl-file]
×

Success!

Help @mattastic spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...