Forcing a 3 row layout dynamically

This is a discussion on "Forcing a 3 row layout dynamically" within the Web Page Design section. This forum, and the thread "Forcing a 3 row layout dynamically 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 Apr 7th, 2007, 11:11
New Member
Join Date: Apr 2007
Location: London
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Forcing a 3 row layout dynamically

Hi,

Does anyone know how I can force my table to be in a 3 row format with the number of columns created dynamically. As I would like items to be displayed in a fixed div. However I want them to be able to scroll through the table with horizontal as opposed to vertical scroll bars. When I've tried it, it comes out in a 3 column format, with the 4th row hidden from view.

In summary I would like a new column to be created for every 4th item. I have done this using tables, but I was told that I was using too many as each item was wrapped in a table which was in turn wrapped in a table cell, which when the number of cells created hit 4 a new column was created. Here's a static version of what I had orignally:

Code: Select all
<table bgcolor="#FFFDFD" cellspacing="3">
<tr>
<td>
<table>
<tr>
<td>
<div id="mainpicture" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
<a href=""><img src ="../images/products/dresses/dr10164bluefront.jpg" border=0 height="160" width= 
"120" /></a> 
</div>
<div id="picturedetails" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
Hello you please work 
<br />Yes
<br />yes
</div> 
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
<div id="mainpicture" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
<a href=""><img src ="../images/products/dresses/dr10109blackfront.jpg" border=0 height="160" width= 
"120" /></a> 
</div>
<div id="picturedetails" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
Hello you please work 
<br />Yes
<br />yes
</div> 
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
<div id="mainpicture" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
<a href=""><img src ="../images/products/dresses/dr10173brownfront.jpg" border=0 height="160" width= 
"120" /></a> 
</div>
<div id="picturedetails" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
Hello you please work 
<br />Yes
<br />yes
</div> 
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
<div id="mainpicture" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
<a href=""><img src ="../images/products/dresses/dr10198greyfront.jpg" border=0 height="160" width= 
"120" /></a> 
</div>
<div id="picturedetails" onMouseOver='document.getElementById("picturedetails").style.visibility = 
"visible";' onMouseOut='document.getElementById("picturedetails").style.visibility = "hidden";'>
Hello you please work 
<br />Yes
<br />yes
</div> 
</td>
</tr>
</table>
</td>
</tr>
Hope that makes sense, I'd like to know the most efficient way to do this and any help would be appreciated as I'm stuck.

Thank you in advance

Last edited by karinne; Apr 7th, 2007 at 13:30. Reason: Please use [code]...[/code] tags when displaying code!
Reply With Quote

  #2 (permalink)  
Old Apr 7th, 2007, 11:39
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Forcing a 3 row layout dynamically

A server side language is the only way to do something like that. PHP or ASP for example.
Reply With Quote
  #3 (permalink)  
Old Apr 7th, 2007, 12:02
New Member
Join Date: Apr 2007
Location: London
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Forcing a 3 row layout dynamically

Hi,

Thanks for your reply, I understand that, but how do I go about forcing the table to be created in three rows?
Reply With Quote
  #4 (permalink)  
Old Apr 7th, 2007, 12:55
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Forcing a 3 row layout dynamically

I suggest you either learn PHP or hire someone to code what you want.
Reply With Quote
  #5 (permalink)  
Old Apr 7th, 2007, 13:01
New Member
Join Date: Apr 2007
Location: London
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Forcing a 3 row layout dynamically

I know how to use PHP and like I said I was able to achieve it with tables, but I haven't been able to acheive it with CSS... I just needed a little advice that's all.

Thanks anyway... I'll get there in the end
Reply With Quote
  #6 (permalink)  
Old Apr 7th, 2007, 13:10
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Forcing a 3 row layout dynamically

Perhaps I don't understand what you want. The word "dynamic" should never be used in the same sentence as CSS. I'm assuming you know very little about CSS; the fact that you're using tables is enough to bring me to that conclusion. Could maybe post a link, an attachment or even a more descriptive question?
Reply With Quote
  #7 (permalink)  
Old Apr 7th, 2007, 13:24
New Member
Join Date: Apr 2007
Location: London
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Forcing a 3 row layout dynamically

Hi,

Ok, maybe I'm not making myself clear at all, but basically this is what I'm trying to achieve

http://www.shesjustgottohaveit.com/N...ies.php/offers

Although I have decided to change the design, the layout will basically be the same. What I would like is for each time a users mouse hovers over the image a semi transparent layer appears showing the items details. Also I wanted to make sure that the items can be scrolled horizontally.

I hope this makes more sense now.

Thank you once again

PS this is what I have used in my PHP file

Code: Select all
  <div id = "itemcontainer">
    <div id = "itempicture">
     <?
      echo "<a href='/productdetails.php/$productcode/$bestcolourname/'><img src='$picture' height='148' width='111' border='0'></img></a>"; 
            ?>    
    </div>
    <div id = "itemdetails">
   <b><font color="#666666">Polka Dot Wrap Dresss</b>
   <br />
   <br />Available in Green, Blue, Black & Orange
   <br />Price £20.00</font>
    </div>
    
  </div>
And the CSS
Code: Select all
#items{height: 500px; width: 600px;}
#itemcontainer{ width: 148px; height: 148px; background-color:#FFFFFF; float: left;}
#itempicture { position:relative; top:0; left:0;   width: 148px; height: 148px; background-color: #ffffff; z-index:1;}
#itemdetails {background-color:#FFFFFF ; height:70px; width:148px; filter:alpha(opacity=75);-moz-opacity:.75;opacity:.75; position:relative; margin-top: -100px; z-index:2;}

Last edited by karinne; Apr 7th, 2007 at 13:31. Reason: Please use [code]...[/code] tags when displaying code!
Reply With Quote
Reply

Tags
css, tables

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
Forcing JavaScript to load before images? JennyChaos Starting Out 14 Jul 13th, 2007 23:02
Is it possible to set the FOCUS() dynamically with javascript AJAY KUMAR JavaScript Forum 2 Jul 9th, 2007 03:29
Forcing a vertical scrollbar cyberseed Web Page Design 6 Jul 5th, 2007 21:04
Changing URLs dynamically - is this possible? fallen_angel Web Page Design 8 May 16th, 2006 23:31
Insert code dynamically djme Web Page Design 21 Nov 26th, 2005 16:38


All times are GMT. The time now is 05:11.


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