Solved

carrying over content to next div

Posted on 2014-01-20
10
369 Views
Last Modified: 2014-03-07
I want to make a newspaper type website (scrolling content horizontally).
Any Ideas?
or how can I carry content between divs once the content fills the first div, the rest carries over the the next?
0
Comment
Question by:Sam Cohen
10 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39795358
HTML <div>s don't do that.  No HTML element will flow text from one to the next.  Even if you find a way to program it... different size screens will cause the <div> to be different sizes unless you have done something to restrict it.  And there is nothing that I know of that will tell you "when a div is full".
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 100 total points
ID: 39795501
If you are trying to do a newspaper look the columns flowing, you may be able to use the CSS column properties. for both Chrome and Firefox you may have to to the hyphen hacks and there is no IE support prior to IE 10.  Rather than going across multiple div containers, the column property lets you define multiple columns within a single div and the flow will automatically adjust for changes in resolution as long as you don't use fixed units of measure.

Details of use are on the Mozilla Developers site:

https://developer.mozilla.org/en-US/docs/Web/CSS/columns

I make some use of column in this page and several others on my site.

Cd&
0
 
LVL 8

Assisted Solution

by:Sam Cohen
Sam Cohen earned 0 total points
ID: 39795911
I think this is what I am looking for:
http://welcome.totheinter.net/columnizer-jquery-plugin/
0
 
LVL 16

Accepted Solution

by:
hankknight earned 400 total points
ID: 39799923
You can do this with pure CSS:
http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_column-count

<!DOCTYPE html>
<html>
<head>
<style> 
.newspaper
{
column-count:3;
-moz-column-count:3; /* Firefox */
-webkit-column-count:3; /* Safari and Chrome */
}
</style>
</head>
<body>

<p><strong>Note:</strong> The column-count property is not supported in Internet Explorer 9 and earlier versions.</p>

<div class="newspaper">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.
</div>

</body>
</html>

Open in new window

0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39801423
A plugin that comes in a 148k zip; indicating an even bigger size in use.  So a big bloated approach instead of learning how to write about a hundred bytes of actual CSS code?

I guess that makes sense if you are trying to avoid learning how to code.  If that much bloat was necessary then you do what you have to do but logically that plugin makes as much sense as using a railway car to transport a bag of pretzels.

The plugin needs 100k+ to generate the CSS in the DOM either in the stylesheet object or in some non-standard object of its own. So more than 99.9% of the plugin is overhead to do the same thing as 100 bytes.  Efficient; very efficient. No sense having a lot of memory and bandwidth if you can't find ways to waste it.

Cd&
0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
ID: 39899387
I've requested that this question be closed as follows:

Accepted answer: 250 points for hankknight's comment #a39799923
Assisted answer: 250 points for COBOLdinosaur's comment #a39795501

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
LVL 8

Author Comment

by:Sam Cohen
ID: 39899378
Thank you to you all.

Thanks COBO, you make alot of sense.
0
 
LVL 8

Author Comment

by:Sam Cohen
ID: 39899388
Get point COBO!
0
 
LVL 8

Author Closing Comment

by:Sam Cohen
ID: 39912004
Thanks all!
0

Featured Post

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now