CSS/HTML question

D

DrewC

I am getting into CSS and was wanting a little clarity on what each is good
for. I know CSS defines how content is displayed. But, for example, could I
define the entire layout of a page (including table/cell deminsions) within
it?

The CSS examples i've seen show how you can affect how content is displayed
within cells and whatnot, but the I couldn't see where the actual deminsions
of the cells.

So, I guess my question is, when would html be used and when will CSS be
used.
 
F

FFMG

Hi,

I am displaying a report in a two columns table, (500px and 200px).
The second col, (200px), displays a url.
But sometimes the url is longer than 200px and the columns is wider
than 200px.

Because I can have more than one table on the page the display appears
broken.
So I would rather the url be forcefully wrapped to the next line rather
than breaking my display.

Would that be possible?

How can I do that?

Thanks

FFMG


--

'webmaster forum' (http://www.httppoint.com) | 'Free Blogs'
(http://www.journalhome.com/) | 'webmaster Directory'
(http://www.webhostshunter.com/)
'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php) | 'Free URL
redirection service' (http://urlkick.com/)
 
B

Ben C

Hi,

I am displaying a report in a two columns table, (500px and 200px).
The second col, (200px), displays a url.
But sometimes the url is longer than 200px and the columns is wider
than 200px.

Because I can have more than one table on the page the display appears
broken.
So I would rather the url be forcefully wrapped to the next line rather
than breaking my display.

Would that be possible?

How can I do that?

The only way to do it is to put a zero-width space between each
character (​). There is a proprietary IE property also suggested
for CSS 3 that does this, but nothing in CSS 2.1
 
J

Jukka K. Korpela

Scripsit Ben C:
- -
The only way to do it is to put a zero-width space between each
character (​).

The zero-width space character should not be expected to work consistently
across browsing situations. In particular, it may well result in the display
of a symbol for an unrepresentable character, if a browser does not
recognize the special meaning of the character and does not even find a
glyph for it in the available fonts.

Note that there is no requirement in HTML specifications that the zero-width
space be processed in any particular way, except that it be treated as a
whitespace character. The rules of HTML do not require conformance to the
Unicode Standard, or its line breaking rules in particular. It's more or
less the general idea that the zero-width space should be treated as
allowing a line break, but this is not a requirement.

Using <wbr> is safer, despite being "nonstandard". It works in a great
majority of browsing situations, and it causes no harm (it is simply
ignored) when it does not work.

Note that URLs should not be broken arbitrarily across line but only at some
reasonable breaking points, like after a "/". So <wbr> should be inserted at
selected positions only.
 
B

Beauregard T. Shagnasty

DrewC said:
I am getting into CSS and was wanting a little clarity on what each is
good for. I know CSS defines how content is displayed. But, for
example, could I define the entire layout of a page (including
table/cell deminsions) within it?

Forget tables for layout. Use them for tabular data.
Look at some of these templates:
http://www.maxdesign.com.au/presentation/page_layouts/
http://benmeadowcroft.com/webdev/csstemplates/left-column.html
The CSS examples i've seen show how you can affect how content is
displayed within cells and whatnot, but the I couldn't see where the
actual deminsions of the cells.

Forget "cells".
So, I guess my question is, when would html be used and when will CSS
be used.

HTML is for content, CSS is for display (including the layout). See
these pages as well:
http://allmyfaqs.net/faq.pl?AnySizeDesign
http://allmyfaqs.net/faq.pl?Tableless_layouts
http://k75s.home.att.net/fontsize.html
 
B

Ben C

Scripsit Ben C:


The zero-width space character should not be expected to work consistently
across browsing situations. In particular, it may well result in the display
of a symbol for an unrepresentable character, if a browser does not
recognize the special meaning of the character and does not even find a
glyph for it in the available fonts.

Note that there is no requirement in HTML specifications that the zero-width
space be processed in any particular way, except that it be treated as a
whitespace character. The rules of HTML do not require conformance to the
Unicode Standard, or its line breaking rules in particular. It's more or
less the general idea that the zero-width space should be treated as
allowing a line break, but this is not a requirement.

Using <wbr> is safer, despite being "nonstandard". It works in a great
majority of browsing situations, and it causes no harm (it is simply
ignored) when it does not work.

Ah, now I understand. I remember you suggesting <wbr> for this before,
but didn't know why.
 
F

FFMG

Jukka said:
Scripsit Ben C:


The zero-width space character should not be expected to work
consistently
across browsing situations. In particular, it may well result in the
display
of a symbol for an unrepresentable character, if a browser does not
recognize the special meaning of the character and does not even find
a
glyph for it in the available fonts.

Note that there is no requirement in HTML specifications that the
zero-width
space be processed in any particular way, except that it be treated as
a
whitespace character. The rules of HTML do not require conformance to
the
Unicode Standard, or its line breaking rules in particular. It's more
or
less the general idea that the zero-width space should be treated as
allowing a line break, but this is not a requirement.

Using <wbr> is safer, despite being "nonstandard". It works in a great
majority of browsing situations, and it causes no harm (it is simply
ignored) when it does not work.

Note that URLs should not be broken arbitrarily across line but only at
some
reasonable breaking points, like after a "/". So <wbr> should be
inserted at
selected positions only.

Thanks for the tip.

I will use <wbr>

FFMG


--

'webmaster forum' (http://www.httppoint.com) | 'Free Blogs'
(http://www.journalhome.com/) | 'webmaster Directory'
(http://www.webhostshunter.com/)
'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php) | 'Free URL
redirection service' (http://urlkick.com/)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top