/    Sign up×
Community /Pin to ProfileBookmark

display divs on page based on div priority number

Guys,

One of the pages in my project contains 4-5 divs. Each div is a table column.
I had a requirement on this.[COLOR=”Red”] [B]I need to place these divs side by side based on user’s priority.[/B][/COLOR] I placed divs side by side .
Now, i need help from u guys, suggesting me how to place divs based on some number value.

Ex: i have 5 divs. div1, div2,div3,div4,div5.
If i want to place div2 in 1st position and div5 in 2nd position like that.
Next time, i want to place div1 in 1st position and div4 in 2nd position(side-by-side) how can i do this.?
I came across z-index attribute to make divs visible one beyond another. But i cannot find any attribute to make divs display side-by-side based on priority.
Every time i login, i prefer which div to appear in what position among 5 divs.
Please give me inputs regarding this.

Thanks in advance.

Krishna

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@BIOSTALLJul 03.2010 — You won't be able to do this with just HTML/CSS I'm afraid. You'll need to either order them with Javascript (ie. using the jQuery framework) upon page load or use a server-side language such as PHP.

Let me know if you have any questions and I'll be happy to explain in more detail ?
Copy linkTweet thisAlerts:
@nishanth22authorJul 03.2010 — Hey,

really thanks for ur reply. I am doing some sorting columns in jquery. SO, i am little familiar with that. So, please tell me how can we do those divs display side by side based on priority.

Actually user will select his column display priority once. Later when ever he logs in , he ll get report(divs display) in that fashion.

Once again thanks for ur reply.
×

Success!

Help @nishanth22 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...