Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Image border color using css
Old 04-07-2005, 10:34 AM Image border color using css
Elytra's Avatar
Novice Talker

Posts: 13
Location: Cambridge, MA
Trades: 0
Hi,

I just created a div for an image border using the following css code:

.border2 {
vertical-align: bottom;
margin: 0px 0px 0px 0px;
padding: 0px;
border-style: solid;
border-width: 2px;
border-color: #334257;
width: 262px;
height: 390px;
display: inline-block;
}

And the html code is:
<div class="border2">
<img src="../images/about_igor.jpg" alt="Igor Shpilenok" width="262" height="390" hspace="0" vspace="0" border="0" />
</div>

It works perfectly on a mac, but in IE (pc), there is a small gap - about 4 pixels - between the image and bottom border. Does anyone have experience with this?

http://www.shpilenok.com/w1/html/about.htm

Thanks!

Last edited by Elytra; 04-07-2005 at 10:36 AM..
Elytra is offline
Reply With Quote
View Public Profile Visit Elytra's homepage!
 
 
Register now for full access!
Old 04-07-2005, 11:14 AM
brokensoul2271's Avatar
- - - - - - - - -

Posts: 750
Location: Lancashire, UK
Trades: 0
I dont understand why you're assigning a border to the image using a div. Why dont you just assign the border to the image?
__________________
Yes, indeed...

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
brokensoul2271 is offline
Reply With Quote
View Public Profile Visit brokensoul2271's homepage!
 
Old 04-07-2005, 11:17 AM
Super Moderator

Posts: 1,573
Location: Kokkola, Finland
Trades: 1
display: inline-block;

should be inline or block, not both. why not just make a class for it with the border attributes and apply it to the directly to the image tag?
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 04-10-2005, 04:19 AM
Skilled Talker

Posts: 51
Trades: 0
img.content {border: 1px #000000;}

<img src="path/to/image.jpg" class="content">

then you can add more features if you want in the css...
orsopanda is offline
Reply With Quote
View Public Profile Visit orsopanda's homepage!
 
Reply     « Reply to Image border color using css
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20590 seconds with 12 queries