Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My html code -
HTML
!-- Container Start -->

<div id="container" style="display:none;" class="animate-bottom">

			<div class="row">
			<div class="col-12">
				<div id="bg"><img src="1280x850.jpg" alt="readMore">
				<div class="readMore-box">
					<a href="#logo"><nav class="readMore">read more</nav></a>
					<div class="arrowDown"></div>
				</div></div>
			</div>
			</div>

my CSS code -
CSS
#container {
	position: relative;
	width: 100%;
	max-height: 100%;
	height: auto;
	margin: 0;
	padding: 0;
}

#bg img{
	width: 100%;
	height: auto;
}

.readMore-box {
	height: 100px;
	padding: 10px;
	text-align: center;
/*	border: 1px solid white; */
	background: red;
	z-index: 100;
}

nav.readMore {
	background: #000000;
	border: 1px solid #ffffff;
	color: #c2a75d;
	margin: auto;
	padding: 10px;
	width: 150px;
	text-align: center;
	transition-duration: 0.4s;
}


What I have tried:

I wants my link button "read more" over an image.
Posted
Updated 29-Oct-16 21:49pm
v3

1 solution

Check out the CSS Layout - The position Property[^], explore the examples where you will find the clue to solving your problem.

+++++[Added in response to further query]+++++

For web pages to be responsive, you have to engage the CSS media queries to detect the change in screen width and apply the appropriate style sheets. Start with this article on The Three R's of Responsive Web Design - Peter Leow's Code Blog[^]
 
Share this answer
 
v2
Comments
Member 12823442 30-Oct-16 4:14am    
I got it.
Thanks Peter.

But when I re-size the browser window the position of my link button is changed to below image. How can I make it responsive so it's place will remain same.
Peter Leow 30-Oct-16 7:55am    
Added in my solution.
Karthik_Mahalingam 3-Nov-16 2:31am    
5
Peter Leow 3-Nov-16 2:35am    
Thank you, Karthik.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900