Css won't work for this?

6 replies
  • WEB DESIGN
  • |
Learning CSS is all great but I've encountered a problem.

This is what it's like.

I use an image for my background for blog post title.

This | represents it perfectly because it's a small image exactly like that.

So it would be like this

|Blog post title| "|background|"

When I use repeat-x it stretches across the entire post title.

I've tried hard to get it to be only "repeat" so that it will stretch up and down to cover all of my blog post title as it takes it two lines sometimes.

When I do that it doesn't appear at all.

Any ideas what I need to do?

Thanks.
#css #work
  • Profile picture of the author Mark Brian
    Not sure if I understood you, but did you want to use repeat-y?
    Signature

    {{ DiscussionBoard.errors[868485].message }}
    • Profile picture of the author Intrepreneur
      Originally Posted by Mark Brian View Post

      Not sure if I understood you, but did you want to use repeat-y?
      Ok the background for my post title is an image.

      This "|" represents the image perfectly as it's as thin as that.

      When I use repeat-x it stretches across the width of the post title, which is needed but sometimes I need ti to stretch Y also to cover the back of my blog post title if it's longer than usual and takes up two lines.

      Basically when using "repeat" it just disappears, you can see the outline for where the background is supposed to appear but it doesn't show on screen.

      It's confsuing me, but maybe it's because I'm a noob and missing a vital key to getting it right.

      Thanks.
      {{ DiscussionBoard.errors[868511].message }}
  • Profile picture of the author Mark Brian
    If you don't specify any repeats it will spread all over.
    Signature

    {{ DiscussionBoard.errors[868627].message }}
    • Profile picture of the author Intrepreneur
      Originally Posted by Mark Brian View Post

      If you don't specify any repeats it will spread all over.
      I'll give this a go and see what happens.

      Thanks.

      I tried that and it still doesn't stretch over all of my blog title text.

      This is wierd I though it would be simple but obviously not.

      Is it that I need to use "inherit"

      Because i've tried that too and it doesn't do anything.

      Here is the CSS

      Code:
      #content .post .post-title-new {
      
                  width: 463px;
      
                  height: 45px;
      
                  border: 1px solid #000000;
      
                  background: url(images/post_title.gif);
      
                  color: #9A9A9A;
      
                  font: bold 10px Verdana;
      
                  padding: 0 15px;
      }
      Thanks.
      {{ DiscussionBoard.errors[869381].message }}
  • Profile picture of the author promo_guy
    Could it be because you are specifying a width?

    Would help if we could see a screen shot or something
    {{ DiscussionBoard.errors[870130].message }}
    • Profile picture of the author Intrepreneur
      Originally Posted by promo_guy View Post

      Could it be because you are specifying a width?

      Would help if we could see a screen shot or something
      Can I unspecify width and height, and leave them out?

      Actually I'll give it a go and see what happens.
      {{ DiscussionBoard.errors[871862].message }}

Trending Topics