473,320 Members | 1,719 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,320 software developers and data experts.

Calulate number of colums from content

KeredDrahcir
426 256MB
I have got a container 800 pixels wide with the overflow set to hidden. Inside I've got the content set to be in columns of a fixed height and 400 pixels wide so that two are shown at a time.
I've got an onclick event to adjust the margins to the columns to move through the content two columns at a time.

Since I know the width and height of the columns, is there a way to calculate how many columns my content is likely to take up. I don't need an exact value. I'd like to do it with JavaScript. I'm willing to do it in jQuery only if it can't be done in JavaScript even if there is more coding required to JavaScipt. I'm willing to do in php as a last resort. I don't suppose I can use CSS but with some of the things you can do with that, I wouldn't be surprised it you could.

Can anyone help me. I can include some source but since it's such a simple idea, I didn't think it was needed.
Oct 1 '15 #1
0 1008

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Joy | last post by:
Hi guys, I am in a tricky situation, I really really hope someone will help me. I got a layout with a main container and three colums inside. Main container: 100% height; 90% width; float: left...
12
by: jose luis fernandez diaz | last post by:
Hi, My OS is: cronos:jdiaz:tmp>uname -a HP-UX cronos B.11.11 U 9000/800 820960681 unlimited-user license I compile in 64-bits mode the program below:
3
by: Tom | last post by:
Hi, I am currently looking for a Content Management System for one of my project in ASP.NET. Here are the requirements: * web based content management * ability to enter content/fragment...
6
by: Ward Germonpré | last post by:
Hi, I have a reference to a dom table. How can I retrieve the number of columns in that table ? The stop value below doesn't work, nor did my experimenting with tbodies and childNodes.. .......
0
by: nemesis.saurabh | last post by:
hi, i am using VS 2005. i have created a master.master. i have added 2 content placeholders, i am able to edit them in the corresponding content page but if i am adding anymore placeholders in...
3
by: happiness4all | last post by:
how to calulate crc of an executable file
4
by: gab | last post by:
Hi :-) I have a table with X and Y (which are strings), I would like to get an output in the form of one colum with X and Y together, and a colum with the number of times the strings is...
60
by: Bill Cunningham | last post by:
I have a row of values like such, placed in a text file by fprintf. 10.50 10.25 10.00 10.75 11.00 What I want to do to the above colum is add a new column right beside it which is a total...
4
by: ruchichir | last post by:
I want to get only the current date and not time in asp.net( visual studio 2008). But in 2008 we have the properties associated with time like System.DateTime. How to calulate only system...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.