[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

HTML Need help with color difference in table

Posted on 2013-06-15
9
Medium Priority
?
333 Views
Last Modified: 2013-07-03
I have a table for the header of my web page and see a difference between 2 cells using an image for the gray shading. I need to separate the cells due to having buttons in the center.

Please view the image enclosed and see the slight difference within the circle.

Is there a fix for this?

Code using for the cells:
.tableCell {
	background-image: url(images/bar.png);
	background-repeat: repeat;

Open in new window

ColorDiff.jpg
0
Comment
Question by:DJPr0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 6

Expert Comment

by:limweizhong
ID: 39250079
Does this occur on a simple test case? Did you happen to change the background-position CSS property?
0
 

Author Comment

by:DJPr0
ID: 39250092
Happens with all browsers and I don't think I changed the background position.

Using this code for each cell:
class="tableCell"
0
 
LVL 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 1500 total points
ID: 39250378
It looks like those are at least 2 different table cells and your background image is starting over at each cell. Some of options could be

a) Use a css gradient instead

b) Change your background image so the color gradient is only 100% vertical without color variation from left to right.  

c) Make sure the table cell to the left has the same exact background image.

It would be easier to determine the problem if you posted a link.  Otherwise, see if these suggestions help.
0
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39251224
post your table html code that will help to see
0
 

Author Comment

by:DJPr0
ID: 39251571
padas - how would I use an css gradient? will it work for all browsers?

see code below:


<style type="text/css">
 #navbar ul { 
	margin: 0; 
	padding: 7px; 
	list-style-type: none; 
	text-align: center; 
	background-image: url(images/bar.png);
   	} 
 
#navbar ul li {  
	display: inline; 
	} 
 
#navbar ul li a {
	text-decoration: none;
	padding: .5em .5em;
	color: #fff;
	font-family:  ;
	font-size: 17px;
	font-family: Tahoma, Geneva, sans-serif;	
  
	} 
 #navbar ul li a:hover {
	color: #000;
	background-color: #fff;
	font-family: Tahoma, Geneva, sans-serif;
	} 
 
table { border-collapse:collapse }
body {
	background-color: #002e56;
	margin:0;
    padding:0;

}
.tableCell {
	background-image: url(images/bar.png);
	background-repeat: repeat;
	
}
</style>
</head>
<table width="100%" border="0" cellpadding="2"  style="border-left-style: none; border-bottom-style: none; border-right-style: none; border-top-style: none; margin-left: 0; margin-right: 0" stcellspacing="0">

  <tr>
    <td colspan="2" bgcolor="#002e56"></td>
    <td width="30%" rowspan="2" bgcolor="#002e56"  style="padding:10"><div align="center"><a href="home.htm" target="main"><img src="images/Header6.png" width="389" height="77"   id="sprytrigger1" border="0" /></a></div></td>
    <td colspan="2" rowspan="2" bgcolor="#002e56"><div align="center"><img src="images/Improve3.png" width="165" height="52"></div>
    </td>
  </tr>
  
  <tr bgcolor="#002e56">
    <td  colspan="2"><div align="center"><img src="images/1975_2.png" width="113" height="45"></div></td>
  </tr>
  <tr>
    <td width="10%" height="30" bgcolor="#999999"class="tableCell" ><div align="center"><a href="http://www.corp.net/" target="_blank"><img src="images/Corp5.png" alt="Systems Corporation" width="91" height="29" border="0"></a></div></td>
    <td colspan="3" bgcolor="#999999"class="tableCell" >
     <div id="navbar"> 
  <ul> 
        <li><a href="home.htm" target="main">&nbsp;Home&nbsp;</a></li> 
        <li><a href="Link1.htm" target="main">1</a></li> 
        <li><a href="Link2.htm" target="main">2</a></li> 
        <li><a href="Link3.htm">3</a></li> 
        <li><a href="Link4" target="_blank">4</a></li> 
  </ul> 
</div> 
       
    </td>
    <td width="10%" bgcolor="#999999"   class="tableCell"><SCRIPT LANGUAGE="Javascript"><!--
         var now = new Date();
         var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
         var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
         var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
         function fourdigits(number)	{
            return (number < 1000) ? number + 1900 : number;
		 }
         today =  days[now.getDay()] + ", " +
         months[now.getMonth()] + " " +
         date + ", " +
         (fourdigits(now.getYear())) ;
         document.write(" "+today+ "");
        //--></SCRIPT></td>
   
  </tr>
  </table>

Open in new window

0
 
LVL 7

Assisted Solution

by:rgranlund
rgranlund earned 500 total points
ID: 39251606
You could always use Photoshop, chop off the end of the image, maybe 2-3 pixels wide and repeat it across the table to the button and the background always match 100%, no matter what. Plus, it will work cross browser and it is almost no overhead.  Or remove the background from the button?
0
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 1500 total points
ID: 39251670
There are a bunch of sites that can generate for you.  I have used this one in the past http://www.colorzilla.com/gradient-editor/
0
 
LVL 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 1500 total points
ID: 39251672
0
 

Author Closing Comment

by:DJPr0
ID: 39297037
Thanks to all!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question