How to Get a Banner to Span the Length of a Web Page

I am a new web developer, and I was asked to create a banner that will span across an entire page using four pictures: one having an "X" to close the message when clicked, a right-rounded side of the dialog box, a center that needs to be stretched across the length of the page, and a left-rounded side of the message box. In addition, I need to add text over the center of the image, similar to the attached image. How would I use the four small images to make one large image that can be used on a page to make a larger button appear to be there?

Thanks in advance for your time and your help. Any help that you can provide would be greatly appreciated. Complete Message to Be Displayed CenterofMessage CloseButtonOnImage RoundLeftSideMessage RoundRightSideMessage
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

thenthorn1010Author Commented:
The best starting point that I have is using the code:

                <table border="0" width="100%">
                        <img src="/imm/LeftBG.gif" width = "100%" height = "50" />
                        <img src="/imm/WarningCenterBG.gif" width = "100%" height = "50" />
                        <img src="/imm/WarningRightBG.gif" width = "100%" height = "50" />

When I use the code in my ASP .NET page, I end up with the attached results. I am unable to get the images to equally be spaces across three cells in the table. Can someone help me by telling me what I am missing in my ASP .NET code? All help is greatly appreciated. CurrentResults
Michel PlungjanIT ExpertCommented:
I would have a look here

in case no-one shows up here
Steve BinkCommented:
Here is an interesting method I found recently:

<div class="button_wrapper"><span class="button_l">&nbsp;</span><span class="button_r">&nbsp;</span><span class="button_c">Your stuff here</span></div>

#top_nav_menu li.menu_item:hover {
  border:1px solid #3294bd;

#top_nav_menu li.menu_item a {

.button_wrapper {

.button_wrapper .button_c,.button_wrapper .button_c a {
  font-family:Verdana, Geneva, Arial, Helvetica, Sans-Serif;
  color:#000000 !important;
  padding:0 9px !important;

.button_wrapper .button_l,.button_wrapper .button_r {

.button_wrapper .button_l {

.button_wrapper .button_r {
  clip:rect(auto, auto, auto, 406px);

.button_wrapper:hover .button_l,.button_wrapper:hover .button_r {

Open in new window

the button image

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Steve BinkCommented:
The CSS I included is specific to a button I used on a website.  You should be able to modify it to show a larger banner with little trouble.
Hey there.

Please don't mess about with tables for this, they are well beyond their sell-by date.  The solution for standards compliant coding is to use new CSS, but allow older browsers to also show the content they are able without any bad side effects.  Here is a possible solution for you, the older browsers simply don't show rounded corners or shadows...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
	<style type="text/css">
		/* create a container for your content (only needed in this demo */
		body {background-color:#eeeeee}
		.container {width:75%; border:1px solid black; background-color:White; padding:1em}
		/* the banner code */
		.mybanner {background-color:#d99da5; position:relative; padding:1em 2em 1em 1em}
		a.closeLink {font-size:200%; font-weight:bold; color:black; display:block; width:1em; position:absolute; top:5px; right:5px; text-decoration:none}
		/* fancy stuff - shadow and rounded corners - that gets ignored by older browsers */
		.mybanner {border-radius:1em; box-shadow:3px 2px 8px rgba(0, 0, 0, 0.53)}
	<script type="text/javascript">
		function hideElement(elementId) {
			document.getElementById(elementId).style.display = "none"; 
	<div class="container">
		<p>Hello World</p>
		<div id="mybanner01" class="mybanner">
			Here is my banner that can contain <a href="">links</a> and <span style="font-weight:bold">formatting</span>
			<a href="#" onclick="hideElement('mybanner01'); return false;" class="closeLink">X</a>
		<p>Hello World</p>

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.