Solved

putting border and centring image on page

Posted on 2013-06-24
2
343 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
2 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 215 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now