简体   繁体   中英

CSS blogspot background positioning help

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

Since it's applied as a background image, you can set the value as "right", to make it go to the right side of the element.

Say, for example, this is your markup:

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

Your CSS would look something like this:

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

That would align the image to the right side of the text.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM