table-like structure

This is a discussion on "table-like structure" within the Web Page Design section. This forum, and the thread "table-like structure are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 27th, 2006, 12:40
New Member
Join Date: Jun 2006
Location: ireland
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
table-like structure

hi all

i'm using css and divs to create a table-like effect, as such:

<div style="float: left; width: 50%; clear: both">Company Name</div>
<div style="float: right; width: 50%; clear: both">Acme</div>
<div style="float: left; width: 50%; clear: both">Email</div>
<div style="float: right; width: 50%; clear: both">info@acme.com</div>

all well and good, until i get an over-long company name, which wraps the text onto the next line, so that the wrapped text lines up with the "Email" header. i don't mind that the text wraps, but i'd like the next "row" to be pushed down by the wrapped text, if possible

any suggestions?

TIA
Reply With Quote

  #2 (permalink)  
Old Jun 27th, 2006, 14:26
New Member
Join Date: Jun 2006
Location: Norfolk, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: table-like structure

I'm not being funny here, but the content/structure suggests to me that you should actually use an HTML table. (And I'm a CSS bloke!).
Reply With Quote
  #3 (permalink)  
Old Jun 27th, 2006, 14:30
New Member
Join Date: Jun 2006
Location: ireland
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: table-like structure

thanks prototypecoding, i'm aware that this is tabular data, and i'd be forgiven for using a table just an academic exercise really, i'm just interested in whats causing the behaviour, and possible solutions! thanks for your response

dave
Reply With Quote
  #4 (permalink)  
Old Jun 27th, 2006, 14:53
New Member
Join Date: Jun 2006
Location: Norfolk, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: table-like structure

Hmmm, this seems to work pretty well in IE and FF:

<div style="float: left; width: 49%;">Company Name</div>
<div style="float: right; width: 49%;">Acme Acme Acme Acme Acme Acme</div>
<div style="width:100%; clear: both"></div>
<div style="float: left; width: 49%;">Email</div>
<div style="float: right; width: 49%;">EMAIL REMOVED - Send PM to This User Instead</div>
Reply With Quote
  #5 (permalink)  
Old Jun 27th, 2006, 15:10
minute44's Avatar
Moderator
Join Date: Apr 2006
Location: Nottingham UK
Age: 24
Posts: 1,347
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to minute44
Re: table-like structure

Quote:
Originally Posted by dscanlon
thanks prototypecoding, i'm aware that this is tabular data, and i'd be forgiven for using a table just an academic exercise really, i'm just interested in whats causing the behaviour, and possible solutions! thanks for your response

dave
Yeah... but you're missing the point.

If you did it this way, sure it would be an acheivement but it would be wrong. It would be just as wrong as using tables for layout. The problem arrises when tags are used to do jobs they were never meant to do. Tables for lauout is wrong and CSS controlled div tags for displaying tabular data is wrong.

Hope this clears things up.
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Reply With Quote
Reply

Tags
tablelike, structure

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Website Structure marSoul Website Planning 4 Oct 11th, 2007 19:31
Frame structure WLQ JavaScript Forum 1 Oct 8th, 2007 09:56
blog structure alexgeek PHP Forum 25 Aug 26th, 2007 01:23
Request opinion on a database table structure doowop Databases 0 Sep 23rd, 2005 13:22


All times are GMT. The time now is 03:08.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43