• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

putting border and centring image on page

hi guys,

how would i put a border of around ten px of #ff3333 and centre the image on my page http://piratescove.ie/test ?

there is no css file attached

2 Solutions
Jagadishwor DulalBraces MediaCommented:
If you are using this image in a single page you can do just:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
	margin:0 auto;
body img{
	border:10px solid #ff3333;	


<img src="images/comp.png" alt="" name="" width="960" height="636" align="absmiddle" />

Open in new window

Add to your image  style="border:10px solid #ff3333"

Following on from the other question add a container div and set its width to 960px and add a style of
margin:0 auto

p.s. change the red font, makes your eyes go funny.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now