Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » 4 corner liquid box issue sample...


4 corner liquid box issue sample...

Reply
  #1 (permalink)  
Old 12-10-09, 10:40 AM
ArtphotoasiA's Avatar
ArtphotoasiA ArtphotoasiA is offline
Newbie Coder
 
Join Date: Dec 2009
Location: Italy
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Talking 4 corner liquid box issue sample...

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
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List box issue jac2703 Windows .NET Programming 2 08-26-08 12:32 PM
[SOLVED] General box positioning questions Shelby HTML/XHTML/XML 21 05-18-08 06:35 AM
Issue with editing Text Box bc641990 PHP 7 02-03-07 09:41 PM
[turnkey] Lyrics site - $149 (LEGAL) rightinpoint General Advertisements 0 10-22-06 04:33 AM
Search script improvement 9999 PHP 14 08-28-06 11:46 PM


All times are GMT -5. The time now is 09:11 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.