473,386 Members | 1,817 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.

CSS Table problem

I'm trying to do a table for laying out a links page in CSS. See
http://qldstorms.com/links.php. My stylesheet is at
http://qldstorms.com/styles/screen.css. My problem is that if the link name
in the first column get's word wrapped, but the description text in the
second column doesn't, the next row get's wrapped to sit next second line
of the link name. Also if a two line link name is last in the category box,
it'll cross the outside of the box. I thought by having a div for each
item(link name and description included) it would make a box around that
that nothing could get in. Can anyone help me with this one? Thanks,

David
Nov 2 '05 #1
7 1848
David Findlay <da***@davsoft.com.au> wrote:
Subject: CSS Table problem
The phrase "CSS table" should only be used to refer to an object
generated by any of the "table*" values for the "display" property.
I'm trying to do a table for laying out a links page in CSS. See
http://qldstorms.com/links.php.


What you have there is a layout, nothing to do with either HTML or CSS
tables.

You've made the mistake of ditching most structural and semantic markup
in favour of div markup. The little structural and semantic markup that
is there is incorrect (<h1)links</h1> for example).

When asking others to help you with a problem it is considered a minimum
courtesy to ensure that your code is valid, your code doesn't validate.
http://validator.w3.org/check?uri=ht....com/links.php

--
Spartanicus
Nov 2 '05 #2
Spartanicus <in*****@invalid.invalid> wrote:
http://qldstorms.com/links.php.


The little structural and semantic markup that
is there is incorrect (<h1)links</h1> for example).


Strike that, I forgot that this isn't your index page.

--
Spartanicus
Nov 2 '05 #3
> You've made the mistake of ditching most structural and semantic markup
in favour of div markup. The little structural and semantic markup that
is there is incorrect (<h1)links</h1> for example).

When asking others to help you with a problem it is considered a minimum
courtesy to ensure that your code is valid, your code doesn't validate.
http://validator.w3.org/check?uri=ht....com/links.php


Fixed that now, had center instead of middle. However still got the problem.
Is there a better way to do these types of pages with better structure?
Thanks,

David
Nov 2 '05 #4
David Findlay <da***@davsoft.com.au> wrote:
When asking others to help you with a problem it is considered a minimum
courtesy to ensure that your code is valid, your code doesn't validate.
http://validator.w3.org/check?uri=ht....com/links.php


Fixed that now, had center instead of middle.


Your markup does not validate.

--
Spartanicus
Nov 2 '05 #5
David Findlay wrote in message news:43**********************@per-qv1-newsreader-01.iinet.net.au...
I'm trying to do a table for laying out a links page in CSS. See
http://qldstorms.com/links.php. My stylesheet is at
http://qldstorms.com/styles/screen.css. My problem is that if the link name
in the first column get's word wrapped, but the description text in the
second column doesn't, the next row get's wrapped to sit next second line
of the link name. Also if a two line link name is last in the category box,
it'll cross the outside of the box. I thought by having a div for each
item(link name and description included) it would make a box around that
that nothing could get in. Can anyone help me with this one? Thanks,


g'day mate

as spartanicus already mentioned, "fix your page first"
a few pointers to this:
you have
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN "http://www.w3.org/TR/html4/loose.dtd"">

the correct entry for the DTD should be (note the wuotes before and after the url)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

(BTW I would use strict)

a bit to read:
http://www.alistapart.com/stories/doctype/

now, your page is HTML but you have also XHTML "syntax" in it which might throw
a few extra problems (I added numbers in front for easy pointers):
1:<head>
2:<title>qldstorms.com</title>
3:<link rel="stylesheet" type="text/css" media="screen" href="styles/screen.css">
4:</style>
5:<link href="http://qldstorms.com/syndication.php" rel="alternate" type="application/rss+xml" title="qldstorms.com News" />
6:<META name="description" content="Website with weather information related to South East Queensland and North East New South
Wales. Stormchasing reports and forecasts.">

3: you use <link> to access your stylesheet, that's good IMO but
4: what is this </style> end tag for?
5: this rss+xml link has XML (XHTML) ending " /> but your DTD isn't XML/XHTML
6: the meta description is again HTML formed.

also check your CSS
http://jigsaw.w3.org/css-validator/

it's valid but has a few warnings.
you might also want to abbreviate some entries:
http://www.w3.org/TR/REC-CSS2/box.ht...ing-properties

padding-bottom : 3px;
padding-left : 3px;
padding-right : 3px;
padding-top : 3px;
as
padding: 3px

and
http://www.w3.org/TR/REC-CSS2/box.ht...der-properties

border-bottom-color : #6e75c2;
border-bottom-style : solid;
border-bottom-width : 1px;
border-left-color : #6e75c2;
border-left-style : solid;
border-left-width : 1px;
border-right-color : #6e75c2;
border-right-style : solid;
border-right-width : 1px;
border-top-color : #6e75c2;
border-top-style : solid;
border-top-width : 1px;

can be written as
border-top: 1px solid #6e75c2
border-right: 1px solid #6e75c2
border-bottom: 1px solid #6e75c2
border-left: 1px solid #6e75c2

or even shorter
border: 1px solid #6e75c2

I know, that doesn't help you with your problem yet,
but it is easier for others to point you in the right
direction if there is a "clean slate"

Nov 2 '05 #6
David Findlay wrote:
http://qldstorms.com/links.php. My stylesheet is at
http://qldstorms.com/styles/screen.css. My problem is that if the link name
in the first column get's word wrapped, but the description text in the
second column doesn't, the next row get's wrapped to sit next second line
of the link name. [...]

It would have been nice if you had provided a sample of the problem.
None of the column 1 content wraps like you describe.
Since this is tabular data, why not use a table?

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Nov 2 '05 #7
David Findlay wrote:
I'm trying to do a table for laying out a links page in CSS. See
http://qldstorms.com/links.php. My stylesheet is at
http://qldstorms.com/styles/screen.css. My problem is that if the link
name in the first column get's word wrapped, but the description text in
the second column doesn't, the next row get's wrapped to sit next second
line of the link name. Also if a two line link name is last in the
category box, it'll cross the outside of the box. I thought by having a
div for each item(link name and description included) it would make a box
around that that nothing could get in. Can anyone help me with this one?
Thanks,


I eventually managed to find what i needed to fix it.

overflow: hidden

on the linkItem div seemed to fix it. I've removed some of the dtd stuff
because it was wrong, I'm going to try and fix that and all the other
issues now. Thanks,

David
Nov 2 '05 #8

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

Similar topics

3
by: Andrew | last post by:
I have a problem creating mySQL tables with PHP. I am making an app where a user can create a project. Pressing "submit" on proj_form.php goes to proj_add.php where a couple of things happen. ...
2
by: Savas Ates | last post by:
i have a stored below it uses create temp table and drop temp table... when more than one user request the same page it probably returns error.. how can i solve this problem ...
6
by: Murtix Van Basten | last post by:
HI all, I am trying to migrate a database from mysql to mssql2k. I use myODBC to connect to mysql server to pull the database from DTS and insert in to sql server. But in mysql server, there is...
4
by: Not Me | last post by:
Hi, I have a stored procedure, that works perfectly when run from the query analyser, however if I run it through access vba, (using exec) I get a runtime error 208: invalid object name...
1
by: Kleist | last post by:
Hi! The XML document is created dynamically. I need to convert it in PDF format. Actually, this is a huge table with data. I don`t know in advance, how much columns it will have. I apply XSL-FO...
0
by: Luis Esteban Valencia | last post by:
Hello I wrote a program with code behind in C# to add row into table dynamically and the program worked very well in .Net Framework 1.1. When I run this program in .Net Framework 2.0 beta...
3
by: mylog | last post by:
hi, I have a problem regarding the retrieval of data from a table. Here's is what I am doing. I have a created a table and from added the rows and columns and also data dynamically from the code...
3
dmjpro
by: dmjpro | last post by:
I think iText commonly used to create or manipulate PDF document in Java. So finally i decided to throw a question over here. For two days i am struggling. I encountered two types of table .....
3
by: josephamarks | last post by:
I am trying to correct a table problem. In IE6, the table (created in VS with ASPX) does display correctly. Ijn IE8, it adds unwanted horizontal scrollbars, and the columns do not display...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
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
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,...

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.