Style Sheet Gradient to single cell

Thread Solved

Join Date: Jun 2009
Posts: 130
Reputation: stevenpetersen is an unknown quantity at this point 
Solved Threads: 1
stevenpetersen's Avatar
stevenpetersen stevenpetersen is offline Offline
Junior Poster

Style Sheet Gradient to single cell

 
0
  #1
Jun 30th, 2009
In CSS I was wanting to know if there is a way to set up a html table cells with tags h1, h2, that are controlled with a style sheet. I would still need to know how to put the Gradient on each cell.
(i will post as solved)

Thank you,<br />
Steven Petersen
Last edited by peter_budo; Jul 2nd, 2009 at 5:05 am. Reason: Editing post because of readibility issue
Steven Petersen
Web Designer / Web Master
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 130
Reputation: stevenpetersen is an unknown quantity at this point 
Solved Threads: 1
stevenpetersen's Avatar
stevenpetersen stevenpetersen is offline Offline
Junior Poster

Re: Style Sheet Gradient to single cell

 
0
  #2
Jun 30th, 2009
In CSS I was wanting to know if there is a way to set up a html table cells with tags that are controlled with a style sheet. I would still need to know how to put the Gradient on each cell.
(i will post as solved)
sorry about my text wrap im still new to the site (New-b)
Steven Petersen
Steven Petersen
Web Designer / Web Master
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,346
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 163
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Style Sheet Gradient to single cell

 
0
  #3
Jun 30th, 2009
the table is styled directly
  1. table { bla bla }
  2. td { bla blah }
where you want to style elements inside the table
  1. td > p { bla bla ]
  2. td > div { bla bla }
these demonstrate the form for a <p> or <div> that is the directly inside a table
[element] >(first child) [element] generic
  1. td * { bla bla }
styles any element that is any child grandchild or lower child of a td
  1. td > p > h1 {bla bla }
any h1 child of a p child of a td

a gradient background ius usually a 1px * (huge)px or a (huge)px * 1px gradient image repeated in the 1px direction
for a 1*100 image background:#0f0 url('gradient.gif') repeat-x;
Last edited by almostbob; Jun 30th, 2009 at 5:33 pm.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 130
Reputation: stevenpetersen is an unknown quantity at this point 
Solved Threads: 1
stevenpetersen's Avatar
stevenpetersen stevenpetersen is offline Offline
Junior Poster

Re: Style Sheet Gradient to single cell

 
0
  #4
Jul 1st, 2009
Can you show me how it would look on the style sheet and how the table would look in the HTML page?
Steven Petersen
Web Designer / Web Master
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,346
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 163
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Style Sheet Gradient to single cell

 
0
  #5
Jul 1st, 2009
  1. body { font:100% verdana,arial; text-align:left; }
  2. @media all {
  3. .dontall {display:none; }
  4. }
  5. @media print {
  6. body { line-height:100%; font-size:12pt; font-family: verdana, arial; }
  7. .dontprint { display:none; }
  8. p { padding: 1px; margin:0; line-height:100%; list-style-type:square; }
  9. p:first-line { font-weight:bold; }
  10. p:first-letter { font-size:150%; float:left; }
  11. }
  12. @media screen {
  13. .dontshow { display:none; }
  14. .doshow { display:inline; }
  15. }
  16. a { text-decoration: none; }
  17. a:hover { background-color: #66cdaa; text-decoration: none; }
  18. a:focus { background-color: #66cdaa; text-decoration: none; }
  19. a:active { background-color: #66cdaa; text-decoration: none; }
  20. a.button { background-color: #e4e0d8; color: #000000; cursor: pointer; }
  21. a.button:hover { background-color: #66cdaa; }
  22. a.button:focus { background-color: #66cdaa; }
  23. a.button:active { background-color: #66cdaa; }
  24. img { border: 0px; }
  25. p { padding: 1px; font-size: 100%; line-height:135%; list-style-type:square; }
  26. p:first-line { font-weight:bold; }
  27. p:first-letter { font-size:200%; float:left; }
  28. table { padding: 1px; }
  29. td { background:url('YOUR GRADIENT IMAGE.gif') repeat-x; }
  30. td > p { font-size: 85%; font-weight:bold; float:right; }
  31. td > div { font-size:150%; font-weight:bold; float:right color:#ff00ff; }
I'm not going to create the page for you,
Last edited by almostbob; Jul 1st, 2009 at 3:22 pm.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 130
Reputation: stevenpetersen is an unknown quantity at this point 
Solved Threads: 1
stevenpetersen's Avatar
stevenpetersen stevenpetersen is offline Offline
Junior Poster

Re: Style Sheet Gradient to single cell

 
0
  #6
Jul 1st, 2009
Is there away to stretch instead of repeat?
Steven Petersen
Web Designer / Web Master
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 130
Reputation: stevenpetersen is an unknown quantity at this point 
Solved Threads: 1
stevenpetersen's Avatar
stevenpetersen stevenpetersen is offline Offline
Junior Poster

Re: Style Sheet Gradient to single cell

 
0
  #7
Jul 1st, 2009
body 
{
background-color: white;
font-family: Times New Roman;
font-size: 12pt; 
}

h1 
{
color: #008000; 
text-align:left;
font-family: Times New Roman;
font-size: 12pt; 
font-style:italic; 
font-weight:bold; 
text-decoration:underline; 
letter-spacing:0pt
} 

h2 
{
color: #008000; 
text-align:left;
font-family: Times New Roman;
font-size: 12pt; 
font-style:italic; 
font-weight:bold
}

p 
{
color: #008000; 
text-align:left;
font-family: Times New Roman;
font-size: 12pt; 
font-style:italic; 
font-weight:bold
}

a:link    
{
color:#000000; 
text-decoration:underline; 
font-size:16px; 
font-style:italic; 
font-weight:bold
}

a:visited 
{
color:#CCCC00; 
text-decoration:underline; 
font-size:16px; 
font-style:italic; 
font-weight:bold
}

a:active  
{
color:#CCCC00; 
text-decoration:underline; 
font-size:16px; 
font-style:italic; 
font-weight:bold
}

a:hover   
{
color:#CCCC00; 
text-decoration:underline; 
font-size:16px; 
font-style:italic; 
font-weight:bold
}


table 
{ 
padding: 0px; 
}

td 
{ 
background:url('YOUR GRADIENT IMAGE.gif') repeat-x; 
}

td > p 
{ 
font-size: 12pt; 
font-weight:bold; 
float:right; 
}

td > div 
{ 
font-size:12pt; 
font-weight:bold; 
float:right color:#ff00ff; 
}
Steven Petersen
Web Designer / Web Master
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,346
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 163
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Style Sheet Gradient to single cell

 
0
  #8
Jul 1st, 2009
a gradient fill is 1 px x huge, or huge x 1px
you repeat the 1px side,
_______________________ << example repeat-y becomes a red rectangle
the attachment is a gradient fill for repeat-y where the larest possible x dimension for the div its from is 390px,
on repeat-x/y/both there are no margins borders padding in the repeat, so that there are no blank spaces

W3C recommendations, font sizes be set in relative sizes, ems and % in screen display,
the 12pt 16px fonts set throughout your css are not good, I am visually restricted, not bad enough to consider myself impaired, but I loathe web sites with fixed fonts set in the stylesheets, it makes it that much harder to read, as the fonts override my browser settings, 16px on a 24inch 2850 * 2140px screen is .15inch high very very small,
screens get bigger, dot sizes on those screens get smaller with each generation, pixels get smaller and smaller
the 12pt font set in @media print in the demo css is a print(paper) setting, not a screen setting,
target cost $1million because their site uses fixed fonts, is not lawfully accessible and they got sued..
onscreen fixed font sizes cannot be resized to suit the visual impairment of the user,
you lose customers, and the law suit.
one lawsuit has created precedent, there is likely to be a rash of them.

keep ahead, its easier than catching up
Last edited by almostbob; Jul 1st, 2009 at 4:31 pm.
Attached Images
File Type: jpg 2.jpg (1.0 KB, 5 views)
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 130
Reputation: stevenpetersen is an unknown quantity at this point 
Solved Threads: 1
stevenpetersen's Avatar
stevenpetersen stevenpetersen is offline Offline
Junior Poster

Re: Style Sheet Gradient to single cell

 
0
  #9
Jul 2nd, 2009
Thank you,
P.S. now i have to learn about
@media all {
@media print {
@media screen {

again thank you for everything.
Steven Petersen
Web Designer / Web Master
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,346
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 163
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Style Sheet Gradient to single cell

 
0
  #10
Jul 2nd, 2009
@media are a way of setting styles for different media in the same stylesheet,
printers accept the layout defined in @media print {}
the demo css is a subset of styles.css.php file ( .php because gzip is enabled for php on my server )
there are media types for screen, print, handheld devices, assisted devices(screen readers for the blind), and others, that are better/worse supported.
@media screen print all; are pretty well supported.
body 12pt margin 1 inch,
P firstline indent,
P first character Bold Cap
works pretty well on paper, but looks crap onscreen,
a screen layout, looks crap on paper.
using media specific css you can make the layout similar enough to be identified as your site, on paper, pc, blackberry, by using styles, that the devices can render accurately.
serve icons to blackberry instead of 800*600 img (on a 200*200 screen?)
print with copyright watermarks
hide links in print

long n rambling,
but the topic is almost unlimited
Last edited by almostbob; Jul 2nd, 2009 at 2:38 pm.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC