473,226 Members | 1,614 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,226 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 1840
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.