473,788 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Preparing to write a post that blasts CSS.


I figure before I go and write my summary of why you should go back to
tables and only use CSS for fonts and colors and stuff, I ought to make
sure I've got my facts right. So, please tell me how I can get this:

<div style="border:1 px solid #000;width:100% ">
<table style="backgrou nd:#CABE9E;
margin:10px 10px 10px 10px;
border-bottom:4px solid #000;
border-left:4px solid #000;
border-right:4px solid #000;
border-top:4px solid #000;
width:100%;">
<tr><td>some table stuff...</td><td>spills over in firefox, and
causes everpresent vertical scroll in IE</td></tr></table>
</div>

to look like this:

<table cellspacing="0" cellpadding="1" bgcolor="000000 "
width="100%"><t r><td>
<table bgcolor="ffffff " cellpadding="8" cellspacing="0"
width="100%"><t r><td>
<table bgcolor="000000 " cellpadding="4" cellspacing="0"
width="100%"><t r><td>
<table bgcolor="CABE9E " cellpadding="4" width="100%"><t r><td>some
table stuff...</td><td>spills over in firefox, and causes everpresent
vertical scroll in IE</td></tr></table></td></tr></table>
</td></tr></table>
</td></tr></table>

Try them in both IE and Firefox.

Apparently the spec for CSS says that the border and margins shouldn't
be counted when calcing the size of the div/table. Take a look at this
(these) bug reports:

https://bugzilla.mozilla.org/show_bug.cgi?id=258523

But IE does something bad too- notice that you get a horizontal scroll
bar at the bottom, no matter how wide your screen goes (with the CSS
version).

But the table version looks fine in both browsers.

Anyway, if I'm missing something that would fix this, tell me.

Jul 21 '05 #1
10 1921


dt******@hotmai l.com wrote:
I figure before I go and write my summary of why you should go back to
tables and only use CSS for fonts and colors and stuff, I ought to make
sure I've got my facts right.
Just because you can't use CSS to make a layout doesn't mean everyone
else can't.
Apparently the spec for CSS says that the border and margins shouldn't
be counted when calcing the size of the div/table.


Infact they do margin/border/padding add to the width/height.
http://www.w3.org/TR/REC-CSS2/box.html

P.S. The table version makes me sick it takes four table to do
something so simple.

Jul 21 '05 #2
Quote From: W3C | http://www.w3.org/TR/REC-CSS2/box.html

"The box width is given by the sum of the left and right margins,
border, and padding, and the content width. The height is given by the
sum of the top and bottom margins, border, and padding, and the content
height."

Jul 21 '05 #3
in comp.infosystem s.www.authoring.stylesheets, dt******@hotmai l.com
wrote:

I figure before I go and write my summary of why you should go back to
tables and only use CSS for fonts and colors and stuff, I ought to make
sure I've got my facts right. So, please tell me how I can get this:
You didn't. It is quite arrogant to complain about CSS, when you don't
know even the very basics. And even for advanced stuff, it is never fault
of CSS, but browers support.

Tables are not fully supported by browsers, I think that CSS is at least
as well supported.

[failure]
to look like this:

[overcomplicated tables, you could have cut at least 2. Of course, then
you would have to know how to use tables.]

div {border:1px solid black;backgroun d:#fff;padding: 8px;}
table {border:4px solid #000;padding:4p x;background:#C ABE9E;width:100 %;}

<div>
<table><tr><td> some
table stuff...</td><td>spills over in firefox, and causes everpresent
vertical scroll in IE</td></tr></table>
</div>
Try them in both IE and Firefox.
Didn't as you didn't give any URL. But it was clear what your problem
was. Simple cure is KISS.
Anyway, if I'm missing something


You didn't miss my killfile.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Kohtuuhintainen yksiö/huone haussa Oulusta syyskuusta eteenpäin.
Searching places to sleep on axis Bonn - Tsech - Poland - baltic sea in
july
Jul 21 '05 #4
dt******@hotmai l.com wrote:
I figure before I go and write my summary of why you should go back
to tables and only use CSS for fonts and colors and stuff, I ought
to make sure I've got my facts right.


I cannot make a nice wooden cabinet. I blame my chisel.

Next time, make sample pages and post them so we can see what else
might be wrong with your code, missing DOCTYPE for example. Thanks for
your indulgence.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #5


Beauregard T. Shagnasty wrote:
Next time, make sample pages and post them so we can see what else
might be wrong with your code, missing DOCTYPE for example. Thanks for
your indulgence.


If you add a strict DOCTYPE the table fails to work (well not on IE of
course).
However that is because he failed to put '#' (bgcolor="00000 0").

Jul 21 '05 #6
logic_earth wrote:

Beauregard T. Shagnasty wrote:
Next time, make sample pages and post them so we can see what
else might be wrong with your code, missing DOCTYPE for example.
Thanks for your indulgence.


If you add a strict DOCTYPE the table fails to work (well not on IE
of course). However that is because he failed to put '#'
(bgcolor="00000 0").


One must repair errors as well. <g>

--
-bts
-This space intentionally left blank.
Jul 21 '05 #7
Your html still has the infinite horizontal scroll bar problem in IE.
It may be simpler but it solves nothing.

Jul 21 '05 #8
All this says is that the "box width" is calculated by including the
margins and border. It doesn't say that when an outer div is deciding
how wide to be, it should include the inner div/table's border's and
margins. In other words, the outer div is supposed to ignore the
inner div's border and margin even though it's part of the "box width".
Seriously, look at the firefox bug url I gave you.

Jul 21 '05 #9
in comp.infosystem s.www.authoring.stylesheets, dt******@hotmai l.com
wrote:
Your html still has the infinite horizontal scroll bar problem in IE.
It may be simpler but it solves nothing.


I was too soon to say yoy didn't miss my killfile (forgot to put you
there apparently), but
http://www.student.oulu.fi/~laurirai...overimage.html

Google for quirks mode.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Kohtuuhintainen yksiö/huone haussa Oulusta syyskuusta eteenpäin.
Searching places to sleep on axis Bonn - Tsech - Poland - baltic sea in
july
Jul 21 '05 #10

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

Similar topics

1
1191
by: tanya | last post by:
HI, I am trying to send out email blasts to over 6000 users of a website (Not Spam) However when I try it with the following script, it crashes at times and sends it through at times. I need a more reliable way of sending out emails to a large number and this is the mail feature of the website. There will be users trying to send out mails at the same time. Please help
4
1984
by: David | last post by:
A friend of mine has to export some data from his current access database into a CSV file to be imported into an accounting package. There are a few things that need to be done most of which I am quie capable of doing. For expample writing the query to grab all the relevant data is fine. Building the macro to export the data via transfertext is also fine. The problem I have lies in his product description field. In his database it is...
0
1158
by: matungafriend | last post by:
Hi I am fresher what kind of questions are asked during .NET Interviews how should i prepare myself.I have just completed my course from my NIIT and looking forward for real job. I am doing the following stuff 1) Preparing myself for certifications. 2) preparing interview questions from www.techinterviews.com , http://www.geocities.com/dotnetinterviews/ and freshers guide for .NET
4
2745
by: bennett | last post by:
How can I do a loop from 1 to 5, where on line 1 I print 1 space followed by a button, on line 2 I print 2 spaces followed by a button, on line 3 I print 3 spaces followed by a button, etc.? I tried this code: for (int i = 1; i <= 5 ; ++i) { for (int j = 1; j <= i; ++j) {
1
1368
by: culley harrelson | last post by:
Is there any benefit to preparing a call to a pre-defined sql function or is the sql function already optimized? create temp table foo(col1 integer); insert into foo(col1) values(1); insert into foo(col1) values(2); insert into foo(col1) values(3); insert into foo(col1) values(4); create or replace function testfunc(integer) returns foo as 'select * from foo where col1 = $1;' language sql;
3
8847
by: Jer425 | last post by:
Hello all, I'm trying to post to another page from asp.net and direct the user there. I've looked through the group and found a lot of information. The following code may work well for what I'm doing. Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click ** Response.Write("<!-- Include File='Example.aspx' -->")
0
1068
by: aprajitha | last post by:
Hi, What is the approach to be followed for preparing a fresh new installation kit for a server using the Microsoft Installer?
2
1504
by: Jeff Rush | last post by:
Forrester Research is doing a study on dynamic languages and has asked that Python be represented. As advocacy coordinator I've volunteered to drive this, collecting answers from the community and locating representatives to participate in interviews. The goal of the study is to: - identify the criteria to use for evaluating such languages - identify the relevant choices of dynamic languages - identify how the different dynamic...
0
1258
by: alipalengara | last post by:
Hi, I have crated a setup project with prerequisites (frmaework 3.5 and SQL express 2005) and i given some custom action for restoring the database. The Problem is that after installing the application, it will pop up a message for "Preparing to Instal.." at everytime when loading application. Can anyone help me out to avoid this popup? Thanks in advance... Ali PP
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.