Jump to content

CSS Gradient issue with tables

- - - - -

  • Please log in to reply
1 reply to this topic

#1
j.lai

j.lai

    Newbie

  • Members
  • PipPip
  • 21 posts
file:///C:/Users/ADMINI%7E1/AppData/Local/Temp/moz-screenshot.pngfile:///C:/Users/ADMINI%7E1/AppData/Local/Temp/moz-screenshot-1.pngfile:///C:/Users/ADMINI%7E1/AppData/Local/Temp/moz-screenshot-2.pngSo i am doing a web project for class and I wanted to have a gradient background. I found this css code online

body{
background: -moz-linear-gradient(top right,#cccccc,#000000);
}

The gradient works, but my tables on my html page is interfering with the gradient. I have a print screen of the webpage below.

Attached File  gradient.jpg   59.85K   221 downloads

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
Try adding

html, body 

{ 

  height: 100%;  

}

In the css.


You have to watch out with those gradients, it's very dependant on the browser the page is opened in. If your teacher uses IE you may not have a gradient at all.

For my IE8 i had to use

filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#c0c0c0',EndColorStr='#f0f0f0'); 

And for Chrome

background: -webkit-gradient(linear, left top, right bottom, from(#cccccc), to(#000000));






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users