d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > I Just Made A Gae App For School > Need Some Help With Css
Add Reply New Topic New Poll
Member
Posts: 4,778
Joined: Apr 28 2007
Gold: 3.36
Dec 29 2012 02:55pm
Any1 can give me advice how to make layout for pictures?

Currently there is a really large margin between images. See here http://rand-art-4.appspot.com/

Here is my css file: http://rand-art-4.appspot.com/site/style.css
Member
Posts: 2,478
Joined: Jan 4 2007
Gold: 7,545.00
Dec 29 2012 07:08pm
The image size looks to be about 200x200 px.

The figure css specifies the height/width ->

Code
figure {
   width: 320px;
   height: 280px;
   text-align: center;
}


Should be something like

Code
figure {
   width: 210px;
   height: 210px;
   text-align: center;
}


Also, there is some default CSS for figure ->

Code
figure {
   display: block;
   -webkit-margin-before: 1em;
   -webkit-margin-after: 1em;
   -webkit-margin-start: 40px;
   -webkit-margin-end: 40px;
}


Your final CSS could look something like:

Code
figure {
   width: 320px;
   height: 280px;
   text-align: center;
   -webkit-margin-start: 0px;
   -webkit-margin-end: 0px;
}
Member
Posts: 4,778
Joined: Apr 28 2007
Gold: 3.36
Dec 30 2012 09:17am
Quote (DirtyRasa @ Dec 30 2012 02:08am)
Your final CSS could look something like:

Code
figure {
   width: 320px;
   height: 280px;
   text-align: center;
   -webkit-margin-start: 0px;
   -webkit-margin-end: 0px;
}


thx for the help

for the final css you probably meant
Code
[CODE]figure {
   width:  210px;
   height: 210px;
   text-align: center;
   -webkit-margin-start: 0px;
   -webkit-margin-end: 0px;
}


but what can I do about this http://shrani.si/?2t/HY/3HBENiy6/aaaa.png
max length of text under the pic is 40 chars, Is there any option that in this case the text starts a little before the picture?

This post was edited by nagravision on Dec 30 2012 09:21am
Member
Posts: 2,478
Joined: Jan 4 2007
Gold: 7,545.00
Dec 30 2012 12:56pm
Oops, you're right. I had some bad copy/pasting.

I'm not sure how to fix the issue you're seeing since it's just an image of the problem.
If you have the actual page, then I could pull up the css and mess around.
You might need to look in to some negative margins though.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll