Solved

carrying over content to next div

Posted on 2014-01-20
10
372 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 83

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
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
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
 
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 43

Expert Comment

by:Rob
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 count occurrences of each item in an array.

809 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