Solved

border around image

Posted on 2011-09-04
4
358 Views
Last Modified: 2012-05-12
put a border around image 105x105 image

put the words
canon eos 550D
DSLR Body

105x105 image

719 inc VAT



and put a border around it
using css
0
Comment
Question by:rgb192
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 36481959
You have two options like you can use background image for the particular div or can create a style sheet like below:
Your Style:
<style>
#product{
	width:140px;
	height:190px;
	border:1px solid #CCC;	
	-moz-border-radius: 10px;
	border-radius: 10px;
	float:left;
	margin-right:20px;
}
#product:hover{
	width:140px;
	height:190px;
	border:1px solid #333;	
	-moz-border-radius: 10px;
	border-radius: 10px;
}

#product .title{
	color:#06C;
	font-weight:bold;
	text-align:center;
	margin:3px;
}
#product img{
	margin:5px 15%;
}
#product .price{
	text-align:center;
	margin-top:10px;
	color:#06C;	
}
</style>

Open in new window


and html:
<div id="product">
<div class="title">Camera</div>
<img src="images/canon-550d.gif" alt="Camera" />
<div class="price">$300</div>
</div>
<div id="product">
<div class="title">Camera</div>
<img src="images/canon-550d.gif" alt="Camera" />
<div class="price">$300</div>
</div>
<div id="product">
<div class="title">Camera</div>
<img src="images/canon-550d.gif" alt="Camera" />
<div class="price">$300</div>
</div>

Open in new window

0
 

Author Comment

by:rgb192
ID: 36484571
what color is the title

it is grey color
0
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 36487981
Use #aaaaaa for title
0
 

Author Closing Comment

by:rgb192
ID: 36490323
thanks
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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

747 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

13 Experts available now in Live!

Get 1:1 Help Now