TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shakti mandal
NA
26
571
Child div is not fitting properly with parent div element
Jul 6 2018 9:45 AM
Hi
I am working on one web application where using html, css and react. Currently i am encountering below issue. Kindly help me sort out this one.
Issue: Image is not fitting with div element.
Code Part:
<
Router
>
<
div
className
=
"App"
>
<
Header
/>
<
div
className
=
'container'
>
<
Route
exact
path
=
'/'
component
=
{
Home
}
/>
<
Route
exact
path
=
'/register'
component
=
{
X
}
/>
<
Route
exact
path
=
'/Login'
component
=
{
Y
}
/>
</
div
>
<
Footer
/>
</
div
>
</
Router
>
for Home Component:
import
'../../Style/Home.css'
;
class
Home
extends
Component
{
render
() {
return
(
<
div
className
=
"landing"
>
</
div
>
)
}
}
img
{
width
:
100%
;
height
:
100%
;
}
.landing
{
position
:
relative
;
background
:
url
(
'../Images/weights-desktop-wallpaper.jpg'
)
no-repeat
;
background-size
:
cover
;
height
:
100vh
;
width
:
100%
;
overflow
:
hidden
;
}
Out Put:(Middile part[Between Header and Footer] of the page)
Reply
Answers (
3
)
How to fix navbar
How to Export HTML Elements with HighChart to Word File?