CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 24th, 2012, 02:02 PM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
New Member - Divs utilising space

Hi all I wonder if you can help.

I am trying to create an effect similar to Pinterest.com.

If you visit designercurtains.biz/screen.png you will note that the divs do not like doing this style.

Scarf should be under dog bandana, and jeans should be under cushion. Is there a simple way of making the divs use the available space?

Each box is a div classed as 'frame'.

Code:
.frame {
	float: left;
	width: 150px;
	margin: 10px;
	background: #fff;
	padding: 10px;
	border: 1px #888 solid;
}
.frame:hover {
  	-moz-box-shadow:    2px 4px 4px 3px #ccc;
  	-webkit-box-shadow: 2px 4px 4px 3px #ccc;
  	box-shadow:         2px 4px 4px 3px #ccc;
}


Thanks in advance.

Reply With Quote
  #2  
Old September 24th, 2012, 02:04 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
give the .frames a height.
and make sure the content is being limited by the serverside script
__________________
PHP Tutorial

Last edited by aeternus : September 24th, 2012 at 02:07 PM.

Reply With Quote
  #3  
Old September 24th, 2012, 02:27 PM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Quote:
Originally Posted by aeternus
give the .frames a height.
and make sure the content is being limited by the serverside script

Thanks for your help aeternus.

I've given the divs heights but 'Jeans' doesn't use up the space between itself and Cushion.

See designercurtains.biz/screen2.png

Also when I increase the height of Pillow, it pushes scarf and jeans to the right and down another line...

And I'm not sure how I make sure the content is being limited by serverside script...

sorry!

Reply With Quote
  #4  
Old September 24th, 2012, 02:44 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
Hi rdbrotherton,

I understand that you are testing this locally, but without seeing any mark-up and how your declared styles are applied to it, no one can really help.

If you want me to check it out, post a link to a online page where you say you applied the style and it is not working for some reason.


See ya

- as for limiting stuff server side. depending on the cms you are using this should be done in the backed. If not, just tell these client that they should limited the amount of characters used. Or more use:
.frame{ overflow:hidden} this will cutt off extra stuff. But that might not be so pretty.

Last edited by aeternus : September 24th, 2012 at 02:49 PM.

Reply With Quote
  #5  
Old September 25th, 2012, 12:13 AM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
aeternus,

Thanks for your help so far its most appreciated.

I've uploaded the index and css file to rdb.x10.mx/de

As you can see, jeans wdoes not move up below cushion, it sits on its line. If I increase the size of pillow (frame3) it pushes both scarf and jeans down even further.

Do you think I going to have to use position absolute attributes to achieve the look I want?

Thanks again.

Reply With Quote
  #6  
Old September 25th, 2012, 10:06 AM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
Quote:
Originally Posted by rdbrotherton
aeternus,

Thanks for your help so far its most appreciated.

I've uploaded the index and css file to rdb.x10.mx/de

As you can see, jeans wdoes not move up below cushion, it sits on its line. If I increase the size of pillow (frame3) it pushes both scarf and jeans down even further.

Do you think I going to have to use position absolute attributes to achieve the look I want?

Thanks again.


Position absolute is by far the last thing you should look at. Position absolute takes elements out of the normal flow of the document. To get the desired result with that you will have to do a lot of extra coding.

Let keep it efficient.
I see that you assigned a height to .frame1 .frame2 .frame3 .frame4 They all have a hieght of 250px; except for .frame2

So if you remove the height from all these frames and just combine them in 1 rule it is much more efficient (the same is true for all your other properties, combine everything if they use the same stuff, it saves you time money, bandwidth and troubles
Code:
.frame1, .frame2, .frame3, .frame4 {
    background: #fff;
    border: 1px solid #888;
    float: left;
    height: 250px;
    margin: 10px;
    padding: 10px;
    width: 150px;
}


Hope this helps! good luck!

-edit: ones you gave all these frames the same properties you can if needed overwrite this by a simple statement like
Code:
.frame2{background:red}

Last edited by aeternus : September 25th, 2012 at 10:09 AM.

Reply With Quote
  #7  
Old September 25th, 2012, 02:27 PM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Thanks mate, I'm quite new to CSS, and while I know some of the basics, stuff like house keeping I haven't done much on.

So to be clear, it would take quite a bit of coding to get my frame divs to position the way I want them?

Thanks again.

Reply With Quote
  #8  
Old September 25th, 2012, 03:26 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
I cant really respond good because i destroyed my motherboard. Anyway added th div should take you 1 min

Reply With Quote
  #9  
Old September 25th, 2012, 03:37 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,830 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 16 h 41 m 29 sec
Reputation Power: 4192
CSS alone is not sufficient to do what you seem to want with dynamic content. The jQuery Masonry plugin can be used for that, however.

Quote:
Originally Posted by aeternus
I cant really respond good because i destroyed my motherboard.

Ouch. How'd that happen? What brand was your MB?
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Reply With Quote
  #10  
Old September 25th, 2012, 03:39 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
Quote:
Originally Posted by Kravvitz
CSS alone is not sufficient to do what you seem to want with dynamic content. The jQuery Masonry plugin can be used for that, however.


Ouch. How'd that happen? What brand was your MB?
a facking expensive dell xps :-P damn frauds ;-) prolly a cheap *** mb ;-) i might have played to much games ii guess B-)

Last edited by aeternus : September 25th, 2012 at 05:26 PM.

Reply With Quote
  #11  
Old September 26th, 2012, 07:23 AM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Thumbs up

Quote:
Originally Posted by Kravvitz
CSS alone is not sufficient to do what you seem to want with dynamic content. The jQuery Masonry plugin can be used for that, however.


That is exactly what I'm after. Thank you both for all your help. I'll definitely come here again if have another problem!

Cheers.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > New Member - Divs utilising space

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap