开发者

Rails 3 application background-image and color pushed to bottom of page

开发者 https://www.devze.com 2023-02-16 22:24 出处:网络
I have build a standard Rails 3 application (using Ruby 1.9.2). I placed all the links to my css files in the stylesheet_link_tag in the app/views/layouts/application.html.erb file. When I run the ap

I have build a standard Rails 3 application (using Ruby 1.9.2).

I placed all the links to my css files in the stylesheet_link_tag in the app/views/layouts/application.html.erb file. When I run the application all the styles in the css files work except that the background-image and color are pushed below the content from the view content from the model views in the app/views folders instead of laying on top of the image and color. In my css file I have the background-image attached to the html tag (code below).

html {
      background-color:#ccdbce;
      background-image: url('images/bg-body.png');
      background-repeat: repeat;
      background-positi开发者_Python百科on: top;
      color:#444;
}

Please let me know what I am doing wrong?


Try the following small modification to the background-position:

html {
      background-color:#ccdbce;
      background-image: url('images/bg-body.png');
      background-repeat: repeat;
      background-position: left top;
      color:#444;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号