473,406 Members | 2,387 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,406 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 51446
"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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.