Jump to content

table align

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

table align Rate Topic: -----

#1 User is offline   memered 

  • W.R. Private
  • Group: Members
  • Posts: 10
  • Joined: 20-April 08

Posted 26 May 2008 - 05:46 AM

hi! I have a problem with the alignment of a table. my web page consists of a table made of two rows. in the second row, I have a menu designed as a table. The problem is I can't align this menu (table) in order to stay fixed to the previous row. I tried from css: margin-top:0, from html valign="top" but it's useless. and this situation doesn't allow me to give exact dimensions of the big table (web page) because then the menu doesn't stay correctly.
The first picture is that of the wrong look of the menu and the second, the way I would like it to be (and the way it is when there are more things written in the page)

Attached File(s)


0

#2 User is offline   supasnail 

  • W.R. Corporal
  • Group: Members
  • Posts: 112
  • Joined: 19-September 07

Posted 26 May 2008 - 06:09 AM

Don't use tables for layout. :)
0

#3 User is offline   benbacardi 

  • Administrator
  • Group: Administrators
  • Posts: 1,140
  • Joined: 06-April 06
  • Gender:Male
  • Location:United Kingdom

Posted 26 May 2008 - 07:02 AM

To solve that problem I think you'd need to add valign="top" to the <td> which the menu and content sits in.

But, as supersnail says... don't use tables for layout! You'd be far better off converting this to a CSS based layout.
0

#4 User is offline   memered 

  • W.R. Private
  • Group: Members
  • Posts: 10
  • Joined: 20-April 08

Posted 26 May 2008 - 07:20 AM

View Postbenbacardi, on May 26 2008, 08:02 AM, said:

To solve that problem I think you'd need to add valign="top" to the <td> which the menu and content sits in.

But, as supersnail says... don't use tables for layout! You'd be far better off converting this to a CSS based layout.

unfortunately it doesn't work :( it aligns only the text, not the column

This post has been edited by memered: 26 May 2008 - 07:20 AM

0

#5 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 26 May 2008 - 08:10 AM

Can you show us the code by linking to the site?
0

#6 User is offline   memered 

  • W.R. Private
  • Group: Members
  • Posts: 10
  • Joined: 20-April 08

Posted 26 May 2008 - 08:54 AM

View PostMarc Amos, on May 26 2008, 09:10 AM, said:

Can you show us the code by linking to the site?

well I'm not sure how can I do that... I'll leave you my IP adress and the way to the file 10.0.0.1/nouatestat2/teste.html (this is with my server IP; with the client IP : 86.120.23.6/nouatestat2/teste.html
0

#7 User is offline   Ben Abrams 

  • The buddy system:never fails
  • Group: Administrators
  • Posts: 1,850
  • Joined: 04-April 06
  • Gender:Male

Posted 26 May 2008 - 10:12 AM

View Postmemered, on May 26 2008, 01:54 PM, said:

well I'm not sure how can I do that... I'll leave you my IP adress and the way to the file 10.0.0.1/nouatestat2/teste.html (this is with my server IP; with the client IP : 86.120.23.6/nouatestat2/teste.html

can you not post some code?

View PostSirkent, on 21 September 2007 - 04:26 AM, said:

<monty python high-pitched female voice>I DON'T LIKE SPAM!</monty python high-pitched female voice>
0

#8 User is offline   supasnail 

  • W.R. Corporal
  • Group: Members
  • Posts: 112
  • Joined: 19-September 07

Posted 26 May 2008 - 10:29 AM

better still, upload your site to some free hosting site if you don't have any hosting already. Somewhere like 5gbfree.com might do just for showing your problems.
0

#9 User is offline   memered 

  • W.R. Private
  • Group: Members
  • Posts: 10
  • Joined: 20-April 08

Posted 26 May 2008 - 05:51 PM

it's ok, I succeeded to solve the problem. I added valign="top" in <td> and it works. Thanks anyway for your support!
0

#10 User is offline   benbacardi 

  • Administrator
  • Group: Administrators
  • Posts: 1,140
  • Joined: 06-April 06
  • Gender:Male
  • Location:United Kingdom

Posted 26 May 2008 - 06:19 PM

I'm sure that's what I suggested earlier! ;)
0

#11 User is offline   supasnail 

  • W.R. Corporal
  • Group: Members
  • Posts: 112
  • Joined: 19-September 07

Posted 26 May 2008 - 06:59 PM

View Postbenbacardi, on May 27 2008, 12:19 AM, said:

I'm sure that's what I suggested earlier! ;)

Yep, Almost word for word lol. But still using tables for layout, so not really problem solved but a whole host of problems gained.
0

#12 User is offline   memered 

  • W.R. Private
  • Group: Members
  • Posts: 10
  • Joined: 20-April 08

Posted 27 May 2008 - 06:12 AM

View Postsupasnail, on May 26 2008, 07:59 PM, said:

Yep, Almost word for word lol. But still using tables for layout, so not really problem solved but a whole host of problems gained.


yeah, I know :rolleyes1: but I was so tired that I understood something else... and there is one more problem, how could I make hover work in IE?

This post has been edited by memered: 27 May 2008 - 06:17 AM

0

#13 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 27 May 2008 - 06:34 AM

View Postmemered, on May 27 2008, 07:12 AM, said:

yeah, I know :rolleyes1: but I was so tired that I understood something else... and there is one more problem, how could I make hover work in IE?

Depending on what you'd like to hover over, and assuming you're referring to IE6, it's appropriate to either wrap the item in an anchor element or use JavaScript for some sort of onmouseover event.

If you're referring to IE7, then you can use the :hover pseudo-class.
0

#14 User is offline   memered 

  • W.R. Private
  • Group: Members
  • Posts: 10
  • Joined: 20-April 08

Posted 29 May 2008 - 04:37 PM

yeah, well I've solved that problem and tomorrow I have to present my project. the thing is I used a table for my menu, not a list (because I find it easier) and I don't know what to say if they ask me why didn't I used list-menu. Any smart answers that could motivate my choice (form IT point of view), or if not, why isn't it a wrong idea to use table. Hope you'll give me some inspiration in answering this possible question
0

#15 User is offline   haku 

  • 日本語 Ninja
  • Group: Members
  • Posts: 652
  • Joined: 21-September 07
  • Gender:Male
  • Location:Yokohama, Japan

Posted 29 May 2008 - 09:28 PM

Hate to tell you this, but I think you will find the general consensus here is that you should have used a list! A menu isn't tabular information, so it shouldn't be a table.

You still have a number of hours, try and switch it to a list (back up your files first). If you are able to do it, then you are set! And if you aren't, when you are asked why you used a table, say 'I wanted to use a list as I understand it is the way it should be done, however I ran into time issues, and so I used a table as a short-term fix'.

This shows that you recognize what you should have done, hopefully earning you some points ;)
<a href="http://www.jaypan.com" target="_blank">Jaypan</a>
<a href="http://www.dudes-japan.com" target="_blank">Dudes Japan</a>
0

#16 User is offline   sypher 

  • the owner3r
  • Group: Administrators
  • Posts: 1,578
  • Joined: 04-April 06
  • Location:North Wales, UK
  • Interests:Art, Boxing, MMA, Graphic Design, Web Design etc. ;)

Posted 29 May 2008 - 11:30 PM

I agree with haku :)
sypher design - North Wales Web Design | Latest Work: - Scala Cinema

CSS - Can't See Sh*t
0

#17 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 30 May 2008 - 05:40 AM

Precisely what haku says, his advice is golden.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users