473,386 Members | 1,654 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,386 software developers and data experts.

100% table from edge to edge

14
I'd like to have a table at the top of my screen that's filled with a color, which will reach from end to end of the monitor, regardless of screen resolution. I'm guessing this is simple...maybe not. Setting it to 100% doesn't seem to do the trick...

Thanks in advance for any pointers.
Jan 30 '08 #1
3 2010
Death Slaught
1,137 1GB
Height unfortunately won't work.

Height does not work correctly in IE. IE treats height as 'min-height'. And, as you might expect, min-height doesn't work at all in IE.
But if you wan't something with width you could try this:

[HTML] <head>
<style type="text/css">
#box {
width:100%;
background-color:#000;
}
</style>
</head>

<body>

<div id="box">
</div>

</body>

[/HTML]

If this isn't wide enough you could change it to this:

Expand|Select|Wrap|Line Numbers
  1.  <style type="text/css"> 
  2.   * {
  3.     width:100%;
  4.   }
  5.   #box {
  6.     width:100%;
  7.     background-color:#000;
  8.   }
  9. </style>
  10.  
Hope it helps, Thanks, Death
Jan 30 '08 #2
drhowarddrfine
7,435 Expert 4TB
Death's first solution is correct but you don't need the div. Just apply all that to the table. But if you are trying to get the table from edge to edge, you need to get rid of the default margins, so:
Expand|Select|Wrap|Line Numbers
  1. html,body,table{margin:0}
Jan 30 '08 #3
torweb
14
Thanks drhowarddrfine and Death...both worked great. I love learning this stuff!
Jan 31 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: groups2 | last post by:
On this page:http://reenie.org/test/testmargin.php There is a gap between the table cell and the edge of the page. How do I get rid of it ? <html cellpadding='0' cellspacing='0' border='0'>...
3
by: William Sullivan | last post by:
Why is it that when I put one HTML element in another, say a table in a page, set the outer element's margin and padding to 0 and the inner element's width to 100%, the inner element's right edge...
6
by: Edge | last post by:
hi all, I added a html table with 2 rows inside the itemtemplate of my gridview. It works ok, but the table border never touches the border of my gridview cell. How should I do if I want the...
1
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
2
by: Dave Ekhaus | last post by:
hi i'm new to javascript. i'm hoping to get some help and find out if what i want to do is possible and - assuming it is, get some tips on how to accomplish the task. ok - assume i have a...
1
by: =?Utf-8?B?d2NsYXJrZTEwMQ==?= | last post by:
Hello all, I've created the following ASP.NET code sample which, when rendered, displays a 100% textbox within a single cell table. The problem is that Internet Explorer (6 or 7) truncates the...
2
by: Jukka K. Korpela | last post by:
Sub titulo "Re: DIV borders different in IE7 when in td" scripsit Ben C: This seems to be the heart of the matter, and I'm trying to get a real discussion started, by moving the discussion to...
2
by: Barely Audible | last post by:
I am try to get the table at the top of the page to stretch across the entire screen andf not leave those annoying bits at each edge... http://www.jedsite.info/content/test.html The CSS i have...
1
oranoos3000
by: oranoos3000 | last post by:
hi i have an error with enter record to table in database(mysql) structure of my table is as follow - phpMyAdmin SQL Dump -- version 2.11.6 -- http://www.phpmyadmin.net -- -- Host:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.