Web Hosting, Design, & Coding forum

General discussion

Problem with table align="center" & background-color:

by vmars316 / September 28, 2010 5:18 AM PDT

win7 home:

I cant seem to get [table align="center"] to work,
or [select style=background-color:rgb(250,240,255);] to work.
See below and completeHtml here:
http://www.vmars316.com/ShowMe/ddMenu_prob.html

Pls, what am I doing wrong?


<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr><td width="200" height="28">
<!-- <form name="HotBasic"> -->
<select style="width:200px; font:14px Verdana; color:rgb(0,0,0); background-color:rgb(250,240,255);" name="menu" onchange="location=this.options[this.selectedIndex].value;">
<option selected="selected" value="">HotBasic</option>
<option value="http://tech.groups.yahoo.com/group/hotbasic/">HotBasic Support Group @ Yahoo</option>
<option value="http://mypages.cwdom.dm/keenej/hotbasic.html">HotBasic Home Page</option>
</select>
</td><td width="200" height="28">
<!-- <form name="JavaScript"> -->
<select style="width:200px; font:14px Verdana; color:rgb(0,0,0); background-color:rgb(250,240,255);" name="menu" onchange="location=this.options[this.selectedIndex].value;">
<option selected="selected" value="">JavaScript</option>
<option value="http://www.c-point.com/javascript_forum/viewforum.php?f=5">c-point.com/javascript_forum</option>
<option value="http://scriptsearch.com/JavaScript/">scriptsearch.com/JavaScript/</option>
<option value="http://www.chami.com/tips/javascript/">Chami.com JavaScript Tips</option>
</select>
</td><td width="200" height="28">
<!-- <form name="Miscellaneous"> -->

Thanks...vmars316

Discussion is locked
You are posting a reply to: Problem with table align="center" & background-color:
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Problem with table align="center" & background-color:
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
CSS not working
by Sovereign Forum moderator / September 30, 2010 3:22 AM PDT

This line in the SELECT

width: 200px; font: 14px Verdana; color: rgb(0, 0, 0); background-color: rgb(250, 240, 255);

is working in my browser. If you change the background-color to some more obvious color, such as red or so, you'll see it does affect the background color. The color you chose is hardly noticeable.

What are you trying to accomplish with this?

table align="center"

Are you trying to align the table to the center? If so, you must give the table a fixed width. You have it set to a 100%, so there is not center relative to the page as the table will go to the edge of the page.

~Sovereign

Collapse -
How to: center these dropDown boxes within the table ?
by vmars316 / September 30, 2010 1:10 PM PDT
In reply to: CSS not working

>What are you trying to accomplish with this?

I want to center the dropDown menus within the Table.
I build the webpage
http://www.vmars316.com/ShowMe/ddMenu_prob.html
from a program, where the user specifies how many columns he/she wants.
Each row will have the same # of columns.
And I want to center these columns.
Pls, how then would I center these dropDown boxes within the table?
Thanks...vmars316

Collapse -
Instead of
by Sovereign Forum moderator / October 1, 2010 5:31 AM PDT

align="center"

say

style="text-align: center"

That will align the text within the cells to the center, not the table itself.

~Sovereign

Popular Forums
icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

CNET FORUMS TOP DISCUSSION

Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?