Forum Moderators: not2easy

Message Too Old, No Replies

add img on the border in css

         

abootaleb

8:34 am on Jun 26, 2018 (gmt 0)

5+ Year Member



hi
How can I set a img in Between border ?
.Liner { 
text-align: center;
margin: 10px auto;
width: 100%;
border-top: dotted 2px #ffd0d0;
}

sorry for my bad english

keyplyr

8:37 am on Jun 26, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi abootaleb and welcome to WebmasterWorld [webmasterworld.com]

If your CSS is in an external file or in the HEAD, then try this:
<div class="Liner"><img src="path/file.jpg"></div>

abootaleb

8:50 am on Jun 26, 2018 (gmt 0)

5+ Year Member



Thanks for your answer
I'm testing now

keyplyr

8:54 am on Jun 26, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You may need to position the image within the CSS code itself. Using text-align: center usually won't work for images.

Dimitri

2:14 pm on Jun 27, 2018 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



I am not sure to understand exactly what you want to do, but you can also look at the CSS property "background-image" [w3schools.com...] , this allows you to show one or more image, control their position, if you want them to repeat or not, you can even include gradients.