tags:

views:

51

answers:

7

can anyone provide insight or a sample of how to create a css based bubble container for html to go inside it?

im looking to make a rounded table. that is to say i want the result to look like a table but with rounded edges. and it would be great to have a slight gradient inside as well.

i found one sample on this site: http://www.seekdotnet.com/ see on the right where they have the "We Are Here to Help!" section.

+2  A: 

It is generally called rounded corners. You can do that using css only. Here is a great list of techniques. Also if you want to use javascript or jQuery in specific, there is a plugin for that called rounded corners (note: javascript is not a mandatory for doing what you want, but it is definitely a easy way).

Teja Kantamneni
@Teja: You can do it only using css?? In all browsers?? As for using javascript to do it, what about all the people that do not have javascript turned on??
jimplode
@jimplode browsers that don't support it or with javascript turned off will see a square box instead, but the content will still be accessible. welcome to the progressive web.
roryf
@roryf:The progressive web is only progressive when the users progress with the technology!! As most web developers out there still have to support IE6 this progression you speak of is happening very slowly!! It would be great if suddenly every user was forced to upgrade to use CSS3 compliant browsers, but there again CSS3.0 has not been fully finalised and released yet and browsers are building their own proprietory code for css. Would be great, but we are a long way off from the progressive world you speak of!!
jimplode
A: 

Depends. if you need it to fully compatible with browsers that don't support CSS3, then try Here

if you want css3 rounded corners then try here for:
#example1 { -moz-border-radius: 15px; border-radius: 15px; }

FatherStorm
A: 

I may have misread the question and, if so, please accept my apologies.

As far as I can tell, the rounded corners in the example you give are, like I previously said in a comment, done by images. You should look into @Teja's answer as he points you in the right direction but, just for you reference, here goes the HTML and CSS used to recreate the layout you mention:

<div id="chat-panel"><h3>We Are Here to Help!</h3>
    <p>We are extremely proud of our support and are available to help you at anytime.</p>
    <span class="panel-bottom">
        <a href="javascript: var e = window.open('http://livechatserver.seekdotnet.com/SightMaxAgentInterface/PreChatSurvey.aspx?accountID=1&amp;amp;siteID=1&amp;amp;queueID=2','chatWindow','width=490,height=404,resizable=0,scrollbars=no,menubar=no,status=no');"&gt;
            <img alt="Click Here to chat with us" src="/images/button/btn_chat_new.gif">
        </a>
    </span>
</div>


#chat-panel {
background:url("http://www.seekdotnet.com/images/sidepanel_repeat.png") repeat-y scroll 0 0 transparent;
margin-bottom:1em;
text-align:center;
}

#chat-panel {
background:url("http://www.seekdotnet.com/images/sidepanel_repeat.png") repeat-y scroll 0 0 transparent;
margin-bottom:1em;
text-align:center;
}

#chat-panel p {
padding:0 10px;
}

#chat-panel .panel-bottom, #special-offer .panel-bottom {
background:url("http://www.seekdotnet.com/images/sidepanel_bottom.png") no-repeat scroll left bottom transparent;
display:block;
padding-bottom:10px;
}
Frankie
A: 

after looking over all the notes here and searchign the web high and low i came to the conclusion that this is the best way to get rounded corners...

http://blog.benogle.com/2009/04/29/css-round-corners/

using lines of variable length to create the top and bottom curves.

feedback?

kacalapy
A: 

This is the best example and explanation I have seen of box with rounded corners.

The All-Expandable Box

There are many ways to do it, use this as some inspiration.

jimplode
A: 

For browsers that support rounded corners, it's dead easy with a simple CSS function:

border-radius:10px;

To support older versions of Firexfox, you will need -moz-border-radius as well.

Internet Explorer doesn't support rounded corners in CSS, but you can use CSS3Pie as a hack to allow it to support them. See the CSS3Pie website for more info on exactly how to use it.

However note that rounded corners on a table element are likely to be problematic. You'll want to wrap your table with a <div> and put the rounded corners on that instead.

Spudley
A: 

A CSS3 rounded corner example to get you started:

<div class="mysexaybox">
    <p>Cos boxes were made to be sexay!</p>
</div>

.mysexaybox {
    background: #ccc;
    background: -moz-linear-gradient(top, #ddd, #bbb);
    background: -webkit-gradient(linear, left top, left bottom, from(#ddd), to(#bbb));
    border: 1px solid #bbb;
    color: #000;
    padding: 4px 8px;
    text-shadow:0 -1px 0 rgba(255, 255, 255, 0.4);
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    -moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}

DD_roundies is a decent solution if you absolutely must support IE6-8 (IE9 will support the rounded corners above)

roryf
this doesnt work at all in IE. i tested with IE 6
kacalapy
I never said it would work in IE. If you're still supporting IE6 to this level you're never going to move forward. Period. Look at the stats for the site you're developing, unless you have a public sector audience I'll bet IE6 is well below 10%.
roryf