Skip to content

Instantly share code, notes, and snippets.

@to
Created April 3, 2012 20:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save to/2295332 to your computer and use it in GitHub Desktop.
Save to/2295332 to your computer and use it in GitHub Desktop.
Google Chrome 18 - svg & absolute bug
<!doctype html>
<html>
<head>
<style type="text/css">
.frame {
position: absolute;
width: 100px;
height: 100px;
}
.content {
position: absolute;
background: red;
}
.row {
width: 200px;
height: 200px;
}
</style>
</head>
<body>
<div class="frame"><div class="content"><svg class="row"></svg></div></div>
</body>
</html>
@to
Copy link
Author

to commented Apr 3, 2012

contentのdivが中のsvgのサイズに合わせて伸張されない。横幅だけカットされる。Chrome 17やiOSのSafariでは正方形が表示されるが、Chrome 18は縦長の長方形になる。svg要素以外は大丈夫そう。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment