By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

CSS Table Resize

P: n/a
Which is the mistake?
I need one column with different size.

Thanks a lot.
table { border: outset 2pt;
border-collapse: separate;
border-spacing: 4pt;
background:black;
color:white;
table-layout:fixed;
width:600;
}

/* I want this one the biggest */
..comentario {
border: inset 2pt;
font-size:28px;
width:400px;
}
..fecha {
border: inset 2pt;
font-size:12px;
width:100px;
}
..nombre {
border: inset 2pt;
font-size:12px;
width:100px;
}
Jan 24 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a


On 24 Jan, 12:09, Gabriel <g...@yahoo.co.ukwrote:
Which is the mistake?
Not telling us a URL for the real site. We can't fix random snippets in
isolation.

Jan 24 '07 #2

P: n/a
Gabriel wrote :
Which is the mistake?
I need one column with different size.

Thanks a lot.
table { border: outset 2pt;
border-collapse: separate;
separate is the default, initial value of border-collapse: so there is
no need to set it.
border-spacing: 4pt;
background:black;
color:white;
table-layout:fixed;
Browsers will trigger table-layout fixed algorithm under certain
conditions: here, we do not see/know what is the markup code, so we
can't say if your css declaration is any useful.
width:600;
1-
Unitless measurements will be treated (by CSS parser) differently
depending on browser, browser version and browser rendering mode
(standards compliant or quirks/compatibility). For best and consistent
rendering across browser, browser versions, I recommend to use a strict
DTD and to always define units.

CSS 1 and CSS 2.x specifications require that non-zero values must be
specified with a length unit; otherwise, the css declaration will be
ignored. Mozilla-based browsers, MSIE 6+, Opera 7+ and other W3C
standards-compliant browsers enforce such handling of parsing error.
CSS 1 Forward-compatible parsing
http://www.w3.org/TR/REC-CSS1#forwar...atible-parsing
CSS 2.1 Rules for handling parsing errors
http://www.w3.org/TR/CSS21/syndata.html#parsing-errors

Using Web Standards in your Web Pages
http://developer.mozilla.org/en/docs...ing_Properties

"Lengths other than zero should be followed by a proper unit without a
space between the number and the unit (eg. 1.2em)."
Mozilla Web Author FAQ: My style sheet doesn't work! Why?
http://www.mozilla.org/docs/web-deve...tylenotworking

So, here, your width:600 could be ignored depending on browsers, browser
versions and rendering mode triggered.

2-
I strongly recommend not to use pt unless the stylesheet is for
printing. I strongly recommend to use only 1 unit for 1 type of
measurement and not 2. If you use, say, px, then only use px and do not
mix with other units.

}

/* I want this one the biggest */
.comentario {
border: inset 2pt;
font-size:28px;
width:400px;
}
.fecha {
border: inset 2pt;
font-size:12px;
For people over 40 years old, 12px may be a bit small. I have customized
Firefox's minimum font size to 13. So, if your webpage design is rigid,
not fluid, not scalable, then setting fixed font-size may break layout.
width:100px;
}
.nombre {
border: inset 2pt;
font-size:12px;
width:100px;
}

600 is not equal to 2pt + 400px + 2pt + 4pt + 2pt + 100px + 2pt + 4pt +
2pt + 100px + 2pt

Gérard
--
remove blah to email me
Jan 25 '07 #3

P: n/a
Gabriel wrote :
Which is the mistake?
I need one column with different size.

Thanks a lot.
table { border: outset 2pt;
border-collapse: separate;
border-spacing: 4pt;
MSIE 6 and MSIE 7 do not support border-spacing.

What Andy wrote you is absolutely right: without a real website and a
real URL, we can't be sure of anything: who knows, your web server might
be mis-configured and then the stylesheet may not be processed at all in
several browsers.

"External stylesheets shall also be served from the www-server with a
MIME-type of 'text/css' in its 'Content Type:' HTTP header.
You may need to negotiate with your server admin to add this MIME type
to your server if you are not able to configure the server yourself."

comp.infosystems.www.authoring.stylesheets
stylesheet authoring FAQ v1.16
http://css.nu/faq/ciwas-aFAQ.html#QA05

Gérard
--
remove blah to email me
Jan 25 '07 #4

P: n/a
Gérard Talbot wrote :
Gabriel wrote :
>.fecha {
border: inset 2pt;
font-size:12px;

For people over 40 years old, 12px may be a bit small. I have customized
Firefox's minimum font size to 13. So, if your webpage design is rigid,
not fluid, not scalable, then setting fixed font-size may break layout.

{
Only in very rare situations we will find users that have a "calibrated"
rendering device that shows fixed font sizes correct. This tells us that
we can never know the real size of a font when it's rendered on the
user end.

Other people may find your choice of font size uncomfortable. A
surprisingly large number of people have vision problems and require
larger text than the average. Other people have good eyesight and prefer
the advantage of more text on the screen that a smaller font size
allows. What is comfortable to you on your system may be uncomfortable
to someone else.
}

comp.infosystems.www.authoring.stylesheets
stylesheet authoring FAQ v1.16
Why shouldn't I use fixed sized fonts ?
http://css.nu/faq/ciwas-aFAQ.html#QA02

Gérard
--
remove blah to email me
Jan 25 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.