Home › Forums › Programming › Copy/paste HTML, HTML DOM, CSS or javascript codes from website itself?
- This topic has 11 replies, 3 voices, and was last updated 4 weeks ago by
Pandern.
-
AuthorPosts
-
2025-03-18 at 4:50 am #80677
c4cc
ParticipantI’m trying to copy this css code< as indicated in red. I want to replicate the same exact font, especially for size, style and color:
Intended font for the intended html element :
Font for the element containing the intended element
Yet when I copy and pasted the intended font into my visual studio code, the final font looked like this
How do I copy/paste the desired code from into my html element so my element’s font is 100% similar? Of course, its size not intended for h1, h2 tags
2025-03-18 at 12:18 pm #80699Yuri Kovelenov
StaffHi,
you could probably use the load font puzzle https://www.soft8soft.com/docs/manual/en/puzzles/Initialization.html#load_font
2025-03-18 at 1:51 pm #80701c4cc
ParticipantThanks for the suggestion, it’s just that I wanna try copying css properties from other webpages without using puzzles.
While those puzzles are indeed helpful I may need to learn this without puzzles
-
This reply was modified 1 month ago by
c4cc.
2025-03-18 at 4:38 pm #80703Pandern
Customer@font-face { font-family: 'Founders Grotesk Regular'; font-weight: 400; src: url('//forum-font.cdn.bubble.io/f1591661753437x401230189466371460/founders-grotesk-web-regular.woff'); } html { font-family: 'Founders Grotesk Regular', Helvetica, Arial, sans-serif !important; font-size: 18px; word-spacing: 2px; line-height: 1.3; }
I guess you forgot to copy/paste the source of the font, like they have in their css?
2025-03-18 at 6:54 pm #80704c4cc
ParticipantThanks. I’ll look this up
2025-03-19 at 7:33 am #80718c4cc
ParticipantMy css
I tried, looks like this:
Besides color and font size, not really the same style as this:
2025-03-19 at 9:10 am #80721Pandern
CustomerYou still need to source the font. It displays helvetica because Founders grotesk is not found.
You can download the font by clicking on this link:
http://forum-font.cdn.bubble.io/f1591661753437x401230189466371460/founders-grotesk-web-regular.woffPut it in the base folder of your project and source it like this:
@font-face { font-family: 'Founders Grotesk Regular'; font-weight: 400; src: url('founders-grotesk-web-regular.woff'); }
you are missing quite a bit of the styling from that site. And h1 and h2 in your css might override any styling you put in .help.
Add this to your .help
padding: 1em 11px .25em 11px; line-height: 1.3; word-spacing: 2px; word-wrap: break-word;
Try also to put your text inside a
<p>
tag. Like this:<div class="help"> <p> <h1>Player Controls..... </p> </div>
2025-03-19 at 9:35 am #80723c4cc
ParticipantI tried
Downloaded font in base folder:Text inside p tags
Where there’s improvement, the font thickness is not the same as that of the source’s?
desired font style and thickness:
2025-03-19 at 11:21 am #80732Pandern
CustomerOkay, well, at least the font is correct now.
And the text looks the same to me, except for the
<h1>
and<h2>
, which by design are larger and thicker.Use only one
<p>
for wrapping the whole text, not each line. The<p>
stands for paragraph and has system styling from the browser. Thats how it is used in the bubble site.Instead of trying to learn CSS by copying from a complex web site, you should maybe learn the basics of webdesign. Then you will be able to copy style from websites more easily.
This one is a good start: https://www.freecodecamp.org/learn/2022/responsive-web-design/
2025-03-19 at 1:01 pm #80740c4cc
ParticipantWhere there’s improvement, the font thickness is not the same as that of the source’s?
Sorry, I meant to say, “While there’s improvement… ” Sorry for the typo. I was in a rush and I didn’t see it
*facepalm
Thanks for your advice again, Pandern, I appreciate it.
-
This reply was modified 1 month ago by
c4cc.
2025-03-21 at 10:24 am #80835c4cc
ParticipantHow come this element has no font-family name in?
Thought normally font-family name is required
2025-03-21 at 12:47 pm #80838Pandern
CustomerIt does… sort of. It inherits it from
html
font
is a shorthand that can set all the different properties of an element’s font:font: 300 15px / 1.73 'Open Sans', sans-serif;
-
This reply was modified 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.