I have an image on my page:
$Bilde = '<img class="bilde" src="' . 'bildebox/' . $Bilde . '" />';
is it possible to alter the "bilde" class in CSS so I can have a border around the picture, or do I have to make that in Photoshop?
Printable View
I have an image on my page:
$Bilde = '<img class="bilde" src="' . 'bildebox/' . $Bilde . '" />';
is it possible to alter the "bilde" class in CSS so I can have a border around the picture, or do I have to make that in Photoshop?
You should be able to alter in the css.
Depends where else that class is used...
Try it .. only take 5 secs or so to input and refresh ?? :)
Vince
I tried with border:1px; but it didn't help, so was wondering if there was an other property or something, or an other way to do it.....
whats wrong with:
<img src="me.jpg" border="0" alt="">
?
This is no fun...:(
I was trying to make a border Acidic, not take it away..:D
Yeas it works (just tried it with):
But I am doing a lot of other things with the picture too, so I made a class:Code:<img src="me.jpg" border="1" alt="">
But then the border won't show if I print this:Code:img.bilde{
margin-right:7px;
float:right;
z-index:22;
visibility: visible;
clear:both;
border:10;
border:1;
}
And I can't set all the properties I want in the HTML code, like clear="both" and float="right", so then I have to use both a class and set "properties in the HTML tag, and I have heard that it isn't a good solution. Anyone agree about that. Or have a better solution?Code:$Bilde = '<img class="bilde" src="' . 'bildebox/' . $Bilde . '" />';
There's no resource like the spec :)Quote:
'border'
Value: [ <border-width> || <border-style> || <'border-top-color'> ] | inherit
Initial: see individual properties
Applies to: all elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: see individual properties
The 'border' property is a shorthand property for setting the same width, color, and style for all four borders of a box. Unlike the shorthand 'margin' and 'padding' properties, the 'border' property cannot set different values on the four borders. To do so, one or more of the other border properties must be used.
Example(s):
For example, the first rule below is equivalent to the set of four rules shown after it:
p { border: solid red }
p {
border-top: solid red;
border-right: solid red;
border-bottom: solid red;
border-left: solid red
}
http://www.w3.org/TR/CSS21/
A full border declaration is for example:
border: 2px solid #f00;
I should really start to use those pages and not only trust my really really bad school book in HTML/CSS (written by a GIRl....:D)
But I guess it is an art to read those pages too, like the MSDN. But I figgured it out after a while. In Firefox the deafult was a 3px border or something...:eek:, but now it looks great. Thanks.
ØØ