473,247 Members | 2,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,247 software developers and data experts.

DIV and BGCOLOR

Am I confused ot shouldn't I be able to say something like this:
<div bgcolor="#CCCCFF">
.....
</div>
And have that section of my page/table be a light blue background?

Tried it inside the HTML as well as in a style sheet, and nothing.

Thanks ahead
Sep 22 '08 #1
10 51424
"Daniel Kaplan" <No****@NoSpam.comwrote in message
news:12***************@nntp.acecape.com...
<div bgcolor="#CCCCFF">
....
</div>
I meant to say that if the DIV is inside a table it won't work....if it's
outside the table, then it does...Surely there must be a way to use div to
change just a piece or portion of a table?
Sep 22 '08 #2
In article <12***************@nntp.acecape.com>,
"Daniel Kaplan" <No****@NoSpam.comwrote:
Am I confused ot shouldn't I be able to say something like this:
<div bgcolor="#CCCCFF">
....
</div>
And have that section of my page/table be a light blue background?

Tried it inside the HTML as well as in a style sheet, and nothing.
<http://dorayme.890m.com/alt/kaplan.html>

--
dorayme
Sep 23 '08 #3
Daniel Kaplan wrote:
Am I confused ot shouldn't I be able to say something like this:
<div bgcolor="#CCCCFF">
....
</div>
And have that section of my page/table be a light blue background?

Tried it inside the HTML as well as in a style sheet, and nothing.
Use CSS instead to style your page.
Sep 23 '08 #4

"dorayme" <do************@optusnet.com.auwrote in message
news:doraymeRidThis-
>
<http://dorayme.890m.com/alt/kaplan.html>
But how about within a part of a table? Like spanning multiple rows and or
cells, while keeping the rest of the table alone. Is that possible? Cause
I can't do that. I can move the DIV tags to the front and end of the table
and get the entire table, but not pieces.

Please tell me it's possible.

Thanks regardless...
Sep 23 '08 #5
In article <12***************@nntp.acecape.com>,
"Daniel Kaplan" <No****@NoSpam.comwrote:
"dorayme" <do************@optusnet.com.auwrote in message
news:doraymeRidThis-

<http://dorayme.890m.com/alt/kaplan.html>
But how about within a part of a table? Like spanning multiple rows and or
cells, while keeping the rest of the table alone. Is that possible? Cause
I can't do that. I can move the DIV tags to the front and end of the table
and get the entire table, but not pieces.

Please tell me it's possible.
Hand on my central CPU, yes:

<http://dorayme.890m.com/alt/kaplan2.html>

--
dorayme
Sep 23 '08 #6
"dorayme" <do************@optusnet.com.auwrote in message
news:do**********************************@web.aioe .org...
In article <12***************@nntp.acecape.com>,
"Daniel Kaplan" <No****@NoSpam.comwrote:
>"dorayme" <do************@optusnet.com.auwrote in message
news:doraymeRidThis-
>
Please tell me it's possible.

Hand on my central CPU, yes:

<http://dorayme.890m.com/alt/kaplan2.html>
I feel terrible clarifying some more...and by the way thanks for going to
the trouble of actually making samples to show me, BUT....I wanted to do it
as background color, so you wouldn't see the cell lines.....Is THAT
possible??
Sep 23 '08 #7
In article <12***************@nntp.acecape.com>,
"Daniel Kaplan" <No****@NoSpam.comwrote:
"dorayme" <do************@optusnet.com.auwrote in message
news:do**********************************@web.aioe .org...
In article <12***************@nntp.acecape.com>,
"Daniel Kaplan" <No****@NoSpam.comwrote:
"dorayme" <do************@optusnet.com.auwrote in message
news:doraymeRidThis-

Please tell me it's possible.
Hand on my central CPU, yes:

<http://dorayme.890m.com/alt/kaplan2.html>

I feel terrible clarifying some more...and by the way thanks for going to
the trouble of actually making samples to show me, BUT....I wanted to do it
as background color, so you wouldn't see the cell lines.....Is THAT
possible??
Yes, certainly. You just have to change the border from my 1px to 0.

td {border: 0;} or just leave out a border instruction altogether in
many cases.

Time to read about CSS and HTML. I suggest

http://htmldog.com/guides/htmlbeginner/

but always just use a 4.01 HTML doctype for now.

--
dorayme
Sep 23 '08 #8
"dorayme" <do************@optusnet.com.auwrote in message
news:do**********************************@web.aioe .org...
Yes, certainly. You just have to change the border from my 1px to 0.

td {border: 0;} or just leave out a border instruction altogether in
many cases.

Time to read about CSS and HTML. I suggest

http://htmldog.com/guides/htmlbeginner/

but always just use a 4.01 HTML doctype for now.

I got it now, so thanks. But strange it didn't work before. I am wondering
wether it is related to the "border-collapse" property which up till now I
was not aware of?????

Thanks for your help so much.
Sep 23 '08 #9
On 2008-09-22, Daniel Kaplan <No****@NoSpam.comwrote:
"Daniel Kaplan" <No****@NoSpam.comwrote in message
news:12***************@nntp.acecape.com...
><div bgcolor="#CCCCFF">
....
</div>

I meant to say that if the DIV is inside a table it won't work....if it's
outside the table, then it does...Surely there must be a way to use div to
change just a piece or portion of a table?
No. You can use div inside a table cell or outside the whole table. If
you want to apply styles to portions of the table, use CSS selectors.

This kind of thing:

<table>
<div>
<tr>

is invalid (and not in a way you get away with).
Sep 23 '08 #10
Daniel Kaplan wrote:
Am I confused
Yes you are. But admittedly you gave a clue of it in your forged From field.
ot shouldn't I be able to say something like this:
<div bgcolor="#CCCCFF">
Well, what prevents you from breaking HTML rules? Maybe some browser
actually implements such nonstandard constructs, and you end up with setting
background color without setting content color.
And have that section of my page/table be a light blue background?
If it's a section, you should have something like

<div class="section ads">
...
</div>

and the specific rendering suggestions should appear in CSS, not in HTML.
This means that you are more or less in a wrong group. HTMLwise, we can just
say that your markup (in your HTML snippet) is invalid and all bets are off.
Tried it inside the HTML as well as in a style sheet, and nothing.
You gave no URL of your best attempt, so yes, you are confused.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Sep 23 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: A.S. | last post by:
Hi, I have the following simple code: <TABLE><TR> <TD BGCOLOR="#FFFFFF" ONCLICK="myform.color.value = this.bgcolor">hello</TD> </TR></TABLE> <FORM ACTION="hello.cgi" NAME="myform"...
6
by: Tim Johnson | last post by:
Hello All: Using javascript to dynamically add row elements to a table. as in ..... row.setAttribute("bgcolor",rowColor); // or cell.setAttribute("bgcolor",rowColor); Using firefox or...
15
by: @sh | last post by:
Trying to do this, but its not working...?! My aim being to change the bgcolor of the cell upon which the user has rolled over, I'll then replicate this as an OnMouseOut to change it back. ...
3
by: Peter Merwood | last post by:
Hi I've developed a simple ASP.NET page using Visual Studio 2003. On the page are a number of tables which I have shaded the background of using the bgcolor table attribute/property. My HTML...
6
by: acord | last post by:
Hi, I want to change the background color of a ul/li row, but the following code is not working as I expected. It works in <table><tr>... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
3
Duchesse
by: Duchesse | last post by:
Hoi! Does anyone know how to make the bgcolor in HTML different than the background color of my SWF movie. I've tried playing around with the bgcolor in <body> and the bgcolor in the SWF parameters...
4
by: Don Lancaster | last post by:
I set up a table... <table bgcolor=#FF9966 name=msSel onmouseover="msSel.bgColor='#FFCC66'" onmouseout="differentFunction ();" <tr><td>stuff</tr></td> mouseout is eventully supposed to do...
5
by: Don Lancaster | last post by:
I am trying to change a group of background colors by calculating their names in a loop . Names are cfh13, cfh15, cfh17, etc... Unlooped code like cfh17.bgColor="#CCFFFF" ; works just fine....
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.