CSS居中查询
除了“HTML 框”之外,我无法访问任何其他内容 - 就是这样。因此,尽管可能有很多更好的方法可以做到这一点,但我的选择有点有限。除了简单的“框”之外,我无法添加任何代码。因此,到目前为止我在谷歌看到的几乎所有解决方案都不起作用。我可以嵌入到页面的链接 - 但我对页面/样式表等的其余部分有零控制。
目前它可以工作,但一切都是左对齐 看起来很严峻,我想将其居中,但最好不要使用过时的命令。有没有一种方法可以在不访问页面其余代码的情况下完成此操作?
我需要将以下内容转换为显示为居中文本:-
<嵌入类型=“text/html”src=“targetwebsite.com/”宽度=“300”高度=“600”>
我可以让它很好地与 <中心> <嵌入类型=“text/html”src=“targetwebsite.com”宽度=“300”高度=“600”>但我正在尝试替换 <中心>用尚未过时的东西来标记。
我知道 iframe,但是由于主机站点的问题,这会导致其他问题。所以请不要告诉我我需要使用 iframe 并在 HTML 小框之外编辑内容 - 遗憾的是我没有这个选项。谢谢。
(第一个 < 之后的额外空格是为了使其显示!)
I do not have access to anything other than an "HTML box" - that's it. So although there might be many better ways of doing this, my options are a little limited. I cannot add ANY code, other to a simple "box". As such almost every solution I have seen so far with Google does not work. I am permitted to embed a link to a page - but I have ZERO control of the rest of the page / stylesheet etc.
At the moment it works, but everything is left justified which looks grim, I would like to centre it but ideally NOT use the obsolete command. Is there a way to do it without having access to the rest of the page code?
I need to convert the following to display as centered text:-
< embed type="text/html" src="targetwebsite.com/" width="300" height="600">
I can make it work well with < center> < embed type="text/html" src="targetwebsite.com" width="300" height="600"> but I am trying to replace the < center> tag with something that is not obsolete.
I am aware of iframe, however due to issues with the host site, this causes other problems. So please do not tell me I need to use iframe and to edit things outside of the little HTML box - I do not have that option sadly. Thank you.
(extra space after the first < is to make it display!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iframe 和 embed 对于 css 来说太难了。
但是您可以使用容器 div 解决居中或宽度问题,如下所示:
iframe and embed are is so hard cases for css.
But you can solve centering or width problems with a container div like that: