Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A little help please...

Featured Replies

Evening Everyone,

 

I have three images with descriptions underneath which need to be aligned together with even margins.

 

something like the portfolio on http://www.webcreationuk.com/

 

what is the best practice to use when trying to get a good margin?

 

I have just used (the width of the container div is 700px wide)

 

.img_index{
width:175px;
float:left;
margin:20px;
}

 

Is this ok? I have a feeling a isn't right thats all..

Edited by Sam G
added [code] tags

I haven't really done this myself.

However if noone respondes by tomorrow i may play on one of my templetes for you and see if i can gain this effect. (without tables)

 

I am a little tipsy right now..... So not best to be playing around with my CSS coding.... however having said that maybe i could..... I can play Pool and Bowl better when i am drunk.... maybe that applies to coding :p

.img_index{
width:175px;
float:left;
margin:20px;
}

Is this ok? I have a feeling a isn't right thats all..

IE6 will have a hissy fit with this perfectly acceptable piece of code.

I recommend using this instead....

 

img_index {
float: left;
padding:20px;
}

 

You can specify width if you want, but I'd just make the images the right size to begin with, then you won't have any problems anyway. The reason for using padding instead of margin is that in IE6, if you float and add margin on the same side as your float, it will double (or increase - either way it's a total pain) your margin.

 

Good luck.

Edited by Sam G
added [code] tags

<div class="gallery">
<img src="/images/the.jpg" width="113" height="75" alt="my image" /><br />
<b>Your Title</b><br />
<div class="description">
This is a description of the neat photo you took. </div>

.gallery {
font-size:90%;
border: 3px double #999;
width: 152px;
height: 166px;
float: left;
text-align:center;
padding: 5px 8px;
margin: 6px 0 12px 8px;
line-height: 18px;
}
.description {
text-align:left;
}

Sample of one on a live site, Adjust widths and margins wanted and done. The title centers as well. To separate more add margins

post-7981-1226208567_thumb.jpg

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.