Solved

putting border and centring image on page

Posted on 2013-06-24
2
350 Views
Last Modified: 2013-07-02
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

Thanks
0
Comment
Question by:jonathanduane2010
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 215 total points
ID: 39272073
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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
body{
	width:960px;
	margin:0 auto;
}
body img{
	border:10px solid #ff3333;	

}
</style>
</head>

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

Open in new window

0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 215 total points
ID: 39272082
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.
0

Featured Post

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question