Welcome to WebmasterWorld Guest from 34.204.168.57

Forum Moderators: not2easy

Message Too Old, No Replies

add img on the border in css

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

New User from IR 

joined:June 26, 2018
posts:2
votes: 1


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
8:37 am on June 26, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


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>
8:50 am on June 26, 2018 (gmt 0)

New User from IR 

joined:June 26, 2018
posts:2
votes: 1


Thanks for your answer
I'm testing now
8:54 am on June 26, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


You may need to position the image within the CSS code itself. Using text-align: center usually won't work for images.
2:14 pm on June 27, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Nov 13, 2016
posts:1194
votes: 285


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.