Closed tangyiming closed 6 years ago
Have you tried to remove all your own stylesheets ? Could you provide a complete example / link ?
In my demo, the background is not white : https://stephane-monnot.github.io/react-vertical-timeline/#/demo
What is your icon format ? svg ? if not, maybe you have to add style on <img>
tag or <i>
.
Example :
.vertical-timeline-element-icon img {
display: block;
width: 24px;
height: 24px;
position: relative;
left: 50%;
top: 50%;
margin-left: -12px;
margin-top: -12px;
}
For the date element, check if you can see this styles in your debug console :
@media only screen and (min-width: 1170px)
.vertical-timeline-element-content .vertical-timeline-element-date {
position: absolute;
width: 100%;
left: 122%;
top: 6px;
font-size: 1rem;
}
@stephane-monnot first of all,thank you for your patient help. well,the problem still there. 1.i removed all my stylesheet 2.i commented the icon configuration
3.i can see the styles you mentioned above
and then i don't know where is the problem.can you give me the code of your demo?thank you
@stephane-monnot i change this width property to 45%,seems solves problem,maybe i need overide the default style sheet
thank you !!!
You can find the code of my demo here : https://github.com/stephane-monnot/react-vertical-timeline/tree/master/docs or a real usecase on my online resume (https://webエンジニア.com/) here : https://github.com/stephane-monnot/resume/tree/master/src/components/ResumeProjectsBlock and here : https://github.com/stephane-monnot/resume/tree/master/src/components/ResumeWorkAndEducationBlock I hope it helps :)
I just want to add that I am also having this same problem and adjusting the element-content
width to 44% solves the issue the same way. I don't have much additional context to give but wanted to at least let you know the problem may be affecting others as well. I'll come back if I find another more detailed solution!
Edit That was quick. I found the culprit! This is caused by my css reset, specifically * {box-sizing: border-box}
. This leads me to two potential solutions:
Either adjust the width of .vertical-timeline-element-content
to 44%
or add box-sizing: content-box
to .vertical-timeline-element-content
. My personal preference would be to adjust the width to 44% because I feel like most people default to using border-box
now, however, I don't know what effects that may have on the rest of the style.
Hope this helps! :)
I will check it when I have time.
I'm having this exact same error.
@shadowae https://github.com/stephane-monnot/react-vertical-timeline/issues/3#issuecomment-355282898 try change the witdh property
Hi, it didn’t help.
Thanks and Regards, Satish Kumar
On 28 Jan 2019, 9:54 AM +0800, 唐一鸣 notifications@github.com, wrote:
@shadowae #3 (comment) try change the witdh property — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Could you provide a link to see your bug ?
the link to my project is : https://github.com/shadowae/resume-site
Thank you
You have text-align on your .App class. Remove it.
Can we change the Circle white outline width ?
Yes, you can with css :
For example :
.vertical-timeline-element-icon {
-webkit-box-shadow: 0 0 0 10px white, inset 0 5px 0 rgb(0 0 0 / 8%), 0 3px 0 10px rgb(0 0 0 / 5%);
box-shadow: 0 0 0 10px white, inset 0 5px 0 rgb(0 0 0 / 8%), 0 3px 0 10px rgb(0 0 0 / 5%);
}
this is my code ,and looks like this: