rajat porwal Posted September 26, 2019 Posted September 26, 2019 I am not able to understand how to enter any other element under SVG. suppose if you have to put your form under the SVG CIRCLE then how you will do it. Or suggest any other idea how i can nest my form's input text field under SVG. I also want to know weather i can align any form's input field like we can align texts. please answere my questions.
PHPremote Posted June 3, 2020 Posted June 3, 2020 Could you submit some or your relevant code? Try Quote <html> <body> <center> <svg style="border:5px solid blue;background-color:tan;margin:0 auto;" height="100" width="100"> <circle cx="50" cy="50" r="40" style="fill:white;stroke:blue;stroke-width:10;" /> </svg> </center> </body> </html> The result is shown in the attached html file. w3forum_cirrle_rajatporwalJune3.html
Sherin Posted June 4, 2020 Posted June 4, 2020 You can html element inside an SVG using foreignobject <html> <head> <meta charset="UTF-8"> <title>HTML inside SVG</title> <style type="text/css"></style></head> <body> <div>I'm a div inside the HTML</div> <svg width="500" height="300" style="border:1px black solid"> <foreignobject class="node" x="46" y="22" width="100" height="100"> <div style="border:1px yellow solid">I'm a div inside a SVG.</div> </foreignobject> </svg> <div>Interesting! But you a Foreign Object.</div> </body> </html>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now