.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
without borders   


If you have a table with some rows and columns, and set the background color on the <tr>´s like this:

table.mytable tr

Then you can see the lines that seperates the <tr>´s and <td>´s. Its like the borders that define the tablestructure still has its original color (or is transparent). And it looks quite ugly. How do you avoid this? Is there a way in CSS to make these borders 0 pixels wide?

I know that I can just put the background color on the table instead, but that is not a possible solution in my case.

Thanks alot :)

    background: #b6b7bc;
    font-size: .80em;
    font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
    margin: 0px;
    padding: 0px;
    color: #696969;

a:link, a:visited
    color: #034af3;

    color: #1d60ff;
    text-decoration: none;


Background image of Anchor not working with Safari/Firefox

Hi, I have following Css where i have used back-ground image. Then i am generating Anchor and assigning css class which has image. It works fine with IE but does not work with Safari,Firefox and Chrome. Can anyone help me on how to fix it. I have given details below. Thanks, Chandan Css .HOME { BACKGROUND-IMAGE: url(../images/home.jpg); WIDTH: 56px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 20px } .HOME A { WIDTH: 56px; HEIGHT: 20px } .HOME A:hover { BACKGROUND-IMAGE: url(../images/home1.jpg); WIDTH: 56px; HEIGHT: 20px } Html Code<td class="home"> <A href="#" class="home" onclick="showpage('abc.html')"/></td>

MSChart - color only part of background

I'm trying to make a risk chart in ASP.NET using an MSChart control, and I only want to color the background for some of the quadrants.  The chart is 5 by 5, with 25 quadrants, and let's say I just want to color the upper-right quadrant red.  Can anyone tell me if that is possible?Thanks!Dave

change TD background/foreground color problem.

I have some javascript that is suppose to change the color of a table TD. the CSS file has an entry like this .tdcommand {} HTML TD is like <td colspan="2" height="162" valign="top" class="tdcommand"> if i put a background-color:red or whatever in the CSS file, the color is shown correctly. If i change it via a script it doesnt seem to have any impact. using the alert() to post info, i've found its entering my function correctly and getting the correct info. the important part of the function is thisfor (var i = 0; i < document.styleSheets[0][CSSRules].length; i++) { if (document.styleSheets[0][CSSRules][i].selectorText == obj) { document.styleSheets[0][CSSRules][i].style[prop] = color document.getElementById("opt_" + option).innerHTML = "'" + color + "'" } }   as i said, using the alert() i can validate that its finding the class ok (obj = .tdcommand) and the property is correct (background-color) and the innerHTML update is working fine. I use this same function to set other things, such as text color and highlighting of span's without any problem. what am i missing?   Justin

background image in banner, over-ridden?

Hi folks, I am working on a master page with a stylesheet.css I put together.  Originally, I set the background as a simple color for the banner attribute until I had an image.  Now that I have the image, I have replaced the background color with the new image in the css file.  While in design mode, it works.  The background color has been replaced with the image.  However, when I run the application, it defaults back to the color (green for simplicity).  I am not sure why this is happening.  Somehow the original background is being pulled from somewhere, and I do not know where.  Has someone had this happen as well?  Why would the background image be displayed in Visual Studio, and then revert back to a previous setting when you run the application?Here is the master page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> <title></title> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form2&q

How do I get the background color of a FrameworkElement passed into a method?

Hello, How do I get the background color of a FrameworkElement passed into a method? Here is the code: public static void SetEditability(FrameworkElement Control, bool IsEditable) { switch (System.Text.RegularExpressions.Regex.Match(Control.GetType().ToString(), @"\.(\w{1,})$").Groups[1].ToString()) { case "TextBox": SolidColorBrush scb = new SolidColorBrush(); scb.Color = Colors.White; // scb.Color = ((SolidColorBrush)((TextBox)Control).Background).Color; if (IsEditable) { ((TextBox)Control).IsReadOnly = false; scb.Opacity = 1; } else { ((TextBox)Control).IsReadOnly = true; scb.Opacity = 0.25; } ((TextBox)Control).Background = scb; break;   The code above works as seen.  But, I can't retain the background color because I can't get the background color from the passed in control (the commented out code above).  The color and opacity do change, just cannot get the color from the control.  How do I get it?  I've already tried several different ways, but I always get the following error: "NullReferenceException was unhandled Object reference not set to an instance of an object." I cannot test for null in this way "if (((SolidColorB

Inside Div text and background color not changing in HTML Tabs

there is below a I have Written a JAVAScript for TABS in HTML of div format and on anchor click the tab changes<script type="text/javascript"> function DisplayDiv(tabno){ var divnum; divnum=tabno; if(divnum == 1){ document.getElementById("div1").style.backgroundcolor="#D0DBF9"; document.getElementById("div2").style.backgroundcolor="#EFF3FE"; document.getElementById("div3").style.backgroundcolor="#EFF3FE"; document.getElementById("thisaudio").style.disply='block'; document.getElementById("comment").style.display='none'; document.getElementById("related").style.display='none'; } if(divnum == 2){ document.getElementById("div1").style.backgroundcolor="#EFF3FE"; document.getElementById("div2").style.backgroundcolor="#D0DBF9"; document.getElementById("div3").style.backgroundcolor="#EFF3FE"; document.getElementById("thisaudio").style.display='none'; document.getElementById("comment").style.display='block'; document.getElementById("related").style.display='none'; } if(divnum == 3){ document.getElementById("div1").style.backgroundcolor="#EFF3FE"; document.getElementById("div2").style.backgroundcolor="#EFF3F

background image

Hiii Coders, I m using div inside my html link. Now i want that there should be a background image which should cover my whole div. How can i get it? Is there any kind of article that will make things clear. plz rep as soon as poss thanx and regards  

Background Image not dispaly in Outlook 03+

Hello friends,I have a problem of email compaign, as i send one template in email in asp.net c#  with html body in mail content, its look too good in web email(yahoo,gmail,msn etc..) but it doesnt display background image  in outlook. Also I have set full path of that image. Is there any things??Thanking you.Krunal

How to Stop background image from scaling

I need a WPF window that has a background image and I desire it not to scale beyond a certain point or maybe even at all.  I am trying to duplicate the image effect of this site...  http://richardpwalton.co.uk/ - When you scale the window it only scales down so far and then starts to clip but I don't know how to do that in WPF. Any suggestions? yes i am relatively new to WPF :)

How to change background or border brush color of an element while it has template in xaml?

Dear all, I want to change some style property of one element in code behind while that element already had a data template in xaml. as an example this is a code for my window: <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"> <Window.Resources> <Style x:Key="ButtonStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <ControlTemplate.Resources> <Storyboard x:Key="OnMouseEnter1"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/> <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Story

Background image in Repeater control

Hi, I have a repeater control:<asp:Repeater ID="Repeater3" runat="server" DataSourceID="SqlDataSource4">                <HeaderTemplate>                </HeaderTemplate>                <ItemTemplate>                    <div >                        <div style="background:url('<%# Eval("HomeSlideBgImage")%>') no-repeat top center" >                        <%# Eval("HomeSlideBgImage")%>                            <h2 id="welcome-heading">                        
Post New Web Links

Alternative coloring and Image background color

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :Sql Server
Hi        I wanted to simple create a report with alternative background colors. Which I could achieve easily. Now I have a column in this report which is supposed to display image. Based on value from the data field a red or green or blue icon is displayed in this column based on expression. Which is also working fine. Now the problem is after I place an image in this details column (with or without expression).  the alternative row coloring stopped working. its always white. I even tried creating a colored background image and still its not helping. Can some one help me out please? If the question is still not clear, please let me know.... for Screenshot please refer http://binabdu-fayaz.blogspot.com/2010/09/alternative-coloring-and-image.html Thanks a lot. Fayaz  

View Complete Post

More Related Resource Links

Image background color is showing while i drag in content place holder in master page ???


Hi  ...

I had few icons and images in my old web project which had no issue with the images and icons background color.

Now i have changed the total look and layout of my web site. After doing so , my old images and icons as well as new images and icons backgroud color is also displaying in the image.

The same image is looking good in my old web site layout ...

I tried all the stuff to show only image not image background ... But , it is not happening ....

The main thing is the same images and icons background color is not showing in my old design ...

Look at the image background , it has grey color background. It was not happening in my old web site design

Plz help me to solve this .... 

Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

how to make a css style background image be linked to an image in the resource file


hey guy, i need help in a very troubling matter. I want to make a textbox with a specific style, within this style a set of images as background parts, how can i attach these images to the custom control as whenever i take the .dll file and add it to the toolbar the images do not appear. So i tried to make them as resource files and their property as embedded in .resx file, so how to make the css style background image url to be linked to any of those image.

thanks in advance

Setting webpage/masterpage background...image?


I want to have the background of my masterpage (the master page for all of my .aspx pages) have a sort of gradient.  I imagine the only way I can do that is with an image.  Or maybe even some other design, but I want to move away from the "solid color" background.

Is the easiest way to do this just to make an image and set that as the background?  What image size should I make it, because some users could possibly have the normal aspect ratio, or maybe a widescreen?  What should I make it like so that it looks good on all computers?

Thanks in advance. :) 

Label can be seen but not the hyperlink over this background image



I have a panel like this. I have an image control inside this panel that I have put as a background image for the panel using the style where I adjusting the z-indexes.

This works fine!

I have put a label and a hyperlink like this in the <table>. The label can be seen but not the hyperlink which is the problem. I have tried to put a z-index to the hyperlink but that does not help.

How is it possible to see the hyperlink here also ? Thanks!


            top: 0px;
            left: 0px;

.stretch2 img
    position: absolute;
            top: 0px;
            left: 0px;

.stretch2 span
    z-index: 100;
    font-size: 1.2em;
    color: #ffff66;
    font-family: Arial, 'Microsoft Sans Serif';
            top: 0px;
            left: 3px;

<asp:Panel ID="Panel6" CssClass="stretch2"  runat="server" Width="100%">
    <asp:Image ID="Image16" runat="server" AlternateText="" ImageUrl="~/images/setImage.jpg" 
        ForeColor="Black" />

    <table style
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend