Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
4 corner liquid box issue sample...
Old 12-10-2009, 11:28 AM 4 corner liquid box issue sample...
ArtphotoasiA's Avatar
Extreme Talker

Posts: 245
Location: Italy
Trades: 0
4 corner liquid box issue sample...

Waiting for CSS version 3 (I read that probably we need to wait several years) we all poor webdesigners / webmaster are forced to get mad for the 4 round corner box issue.

- 1 it is possible do the box layout base with tab tag
- 2 it is possible do the box layout base using div tag and no table


Case 1 - is probably easier to work with specially if you have never done that before but is not recommended
Case 2 - actually you do not save much code in the page using div instead of tab but is much better for consistency and for future development


In both cases basically must add a set of corner's images (of the due color), can be 2 or 4 images x box depending if the box have a fix width or a width 100% ===> the liquid case

Today i have just made some of those liquid boxes so I wish to share where the problem is worst, where you need all 4 corners images, and of course you need 4 XHTML elements in order to look them up.

Please note that:
- I have not used a background-color option because the color to be used for my customer was a pantone color not web safe, so no way to make a # color code but need to work with a background-image option _zzz.png
- The 4 corner images are:
_aaa.png _bbb.png _ccc.png _ddd.png







So here comes the CSS...


Code:
<!-- main liquid box -->

.minibox {
background-image:url(../images/_zzz.png);
width:100%;
}




<!-- link text image all content style -->

.imgminibox
{
border: #660033 solid 1px;
 }
.textminibox {
text-align:left;
padding:10px;
font:Arial, Helvetica, sans-serif;
font-size:12px;
color:#FFFFFF;
font-weight:bold;
}
a.linkminibox  {
font:Arial, Helvetica, sans-serif; 
font-size:12px;
color:#FFFFFF;
font-weight:bold;
text-decoration: underline;
}
a.linkminibox:hover  {
font:Arial, Helvetica, sans-serif;
font-size:12px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
}



<!-- here are the 4 cornes -->


.roundaaa {
background-image:url(../images/_aaa.png);
background-repeat:no-repeat;
background-position: left top;
 }
.roundbbb {
background-image:url(../images/_bbb.png);
background-repeat:no-repeat;
background-position: right top;
 }
.roundccc {
background-image:url(../images/_ccc.png);
 background-repeat:no-repeat;
background-position: left bottom;
 }
.roundddd {
background-image:url(../images/_ddd.png);
background-repeat:no-repeat;
background-position: right bottom;
 }
so here comes XHTML...


Code:
<div class="minibox">
               <div class="roundaaa">
            <div class="roundbbb">
            <div class="roundccc">
            <div class="roundddd">
             <div class="textminibox"> 
 

                CONTENT WITH TEXT IMG LINK GOES HERE



             </div>
             </div>
            </div>
            </div>
            </div> 
</div>
Hope you like
__________________
" the moment, the unique and unrepeatable second "

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
ArtphotoasiA is offline
Reply With Quote
View Public Profile Visit ArtphotoasiA's homepage!
 
 
Register now for full access!
Old 12-10-2009, 03:09 PM Re: 4 corner liquid box issue sample...
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Or, you could try this method:

Quote:
<!-- begin rounded box -->
<b class="rtop">
<b class="r0"></b><b class="r1"></b><b class="r2"></b>
<b class="r3"></b><b class="r4"></b><b class="r5"></b>
</b>


/* by use of margins, the following curves the edges the menu boxes */
b.btop {
margin-top: 0px;
display: block;
background: transparent;
}
b.btop b {
display:block;
height: 1px;
overflow: hidden;
background-color: #ffe1c1;
}

b.btop {
margin-top: 0px;
display: block;
background-color: transparent;
}
b.btop b {
display:block;
height: 1px;
overflow: hidden;
background-color: #ffe1c1;
}

b.r0 {
margin: 0 8px;
background-position: 0px;
}
b.r1 {
margin: 0 6px;
background-position: 1px;
}
b.r2 {
margin: 0 4px;
background-position: 2px;
}
b.r3 {
margin: 0 3px;
background-position: 3px;
}
b.r4 {
margin: 0 2px;
height: 2px;
background-position: 5px;
}
b.rtop b.r5, b.btop b.r5{
margin: 0 1px;
height: 2px;
background-position: 7px;
}
Works pretty well too.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 12-10-2009, 04:15 PM Re: 4 corner liquid box issue sample...
ArtphotoasiA's Avatar
Extreme Talker

Posts: 245
Location: Italy
Trades: 0
Thanks LadynRed ... did not know that!

__________________
" the moment, the unique and unrepeatable second "

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
ArtphotoasiA is offline
Reply With Quote
View Public Profile Visit ArtphotoasiA's homepage!
 
Reply     « Reply to 4 corner liquid box issue sample...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.50407 seconds with 12 queries