User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 422,642 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,758 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 705 | Replies: 1
Reply
Join Date: Oct 2006
Location: UK
Posts: 140
Reputation: MaxMumford is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
MaxMumford's Avatar
MaxMumford MaxMumford is online now Online
Junior Poster

Question Repeat some javascript code until the row is full

  #1  
Mar 11th, 2008
Hi all!

I need to know how to repeat a javascript code snippet, until the table's row is full - so without stretching it. The row is inside the middle column of an 80% width table, made up of 3 columns, one for a left side graphic, the middle column for the content, and the right hand side one for the right side graphic.

All the javascript code is writes in a random 35/35 thumbnail image, and so i want this to repeat all the way to the end, so its good for all resolutions.

Thanks verrrry much guys and gals :]
Max

PS. Page: http://www.grafax.co.uk/testingserve...b/example.html
& its the images at the top that I want repeated right to the edge.
Last edited by MaxMumford : Mar 11th, 2008 at 11:02 am. Reason: page example
Economizerz Hosting
Price Beater Promise

10% Cheaper Hosting, & Double Bandwidth and Web Space
Click here to apply
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 114
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Repeat some javascript code until the row is full

  #2  
Mar 11th, 2008
Those images are predefined, and set to occupy a certain percentage of the width of the page. They contain links to other pages. It's a menu.

You need to do the following. The example is for 10 images:

<html>
<head>
...
<style type="text/css">
.wfl {width: 100%}
.w10 {width: 10%; margin: 0; border: none; padding: 0; text-align: center;}
.pic {padding: 2px; clear: both;}
</style>
...
</head>
<body>
...
<table class="wfl">
  <tr>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic1" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic2" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic3" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic4" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic5" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic6" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic7" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic8" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic9" />
    </td>
    <td class="w10>
      <img src=blank.jpg class="pic" id="pic10" />
    </td>
  </tr>
</table>   
...
</body>
</html>

blank.jog is an image the same size, with nothing but your background color in it. This holds the places until js loads the images.

Now use js to insert your random thumbnails.
Last edited by MidiMagic : Mar 11th, 2008 at 1:59 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 3:33 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC