1

I need to format image buttons in div 800x800 to make these sets @Photo attached. I can only use css classes and maybe someone got good tutorial to do that or just help me out.

Buttons need to be in clear lines i made this in a hurry.

Example

2
  • Use table layout for this kind of design. Take 5 Rows and 5 Columns and insert the image buttons according to your design. Commented Aug 13, 2012 at 9:54
  • I can only use css can't use tables;/ that the problem:) Commented Aug 13, 2012 at 9:55

1 Answer 1

2

I'd use a framework to do this, thus not having to create it from scratch. A good one is Twitter Bootstrap which have a great scaffolding feature. However, if you'd rather do it yourself, you should create a class with the size you'd like, for example 200x200px, then you create offset classes that you combine with this class, like:

.wrapper {
  width: 800px;
  height: 800px;
}

.row {
  display: block;
}

.box {
  width: 200px;
  height: 200px;
  margin: 10px;
  background: #000000;
}

.offset1 {
  margin-left: 210px;
}

.offset2 {
  margin-left: 420px;
}​

and so on.

Here's a working example I made on jsfiddle: http://jsfiddle.net/WUZnW/2/

However, using bootstrap, which already has this feature, would be advised since you'll have a dedicated community behind you to correct any errors that might exist in the code as well as making sure it will be compatible even with future web standards.

Link to bootstrap's scaffolding feature: http://twitter.github.com/bootstrap/scaffolding.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.