0

i'm trying my hands on coding a skin for blogspot.com i basically got everything else done except for one issue which is a part of my design.

Beside the title of the blog, i've design it such that there will be an image floating right next to the title of the blog. That would be easy if i were to use add in a tag into the widget section, but if i were to share this among people (where they will also have different blog name which result in different length) so the image will move according to the title's length. I'm having problem with this.

I've no idea how i should attempt on this as i can't use php on blogspot =/

To better understand what i said, here's an example of what i meant http://i558.photobucket.com/albums/ss23/crayscrays/randomfonthelp.jpg

4

1 回答 1

1

由于它是作为背景图像应用的,因此您可以将值设置为“right”,使其移动到元素的右侧。

比如说,这是你的标记:

<h1>This is a blog post</h1>

你的 CSS 看起来像这样:

h1 { 
  background: transparent url(myimage.jpg) no-repeat right center; 
  padding-right: [widthOfImage]px;
}

这会将图像与文本的右侧对齐。

于 2011-01-25T15:25:35.357 回答