- This topic is empty.
-
AuthorPosts
-
June 25, 2013 at 12:06 am #45815
Historical Forums User
ParticipantHello all, can anyone please give me hand. I am struggling trying to get an h1 to have a background image that flows from the right of the text and expands the width of the container. I left a link with a photoshop quick sketch of what I need. The site is responsive and the image should flow with the width of the container. Thanks for any help.
June 25, 2013 at 12:45 am #140234bablucolno
Participant@aaronbalthaser
please try this….
h1 { background: url (yourimg) right top no-repeat; }June 25, 2013 at 12:52 am #140236surajnaikin
Memberif you’re to use background, just background position it right, should that not work? shouldn’t that be easy or there is something else?
besides put a robots.txt with access denied to search engines crawling your site, until you go live.
June 25, 2013 at 3:21 am #140241CodeGraphics
ParticipantSomething like this: http://codepen.io/codegraphics/pen/BpLsz
June 25, 2013 at 5:55 am #140341bablucolno
ParticipantJune 25, 2013 at 7:11 am #140255Paulie_D
MemberGuys, none of the offered solutions are what the OP is looking for.
He only wants the image AFTER the text inside the h1 has finished, and to take up the remaining space.
I seem to recall something on this a little while ago which was solved using a pseudo element…but I’m having trouble finding it.
June 25, 2013 at 7:24 am #140256Paulie_D
MemberNo sure if this is exactly it but by adding a span it is doable.
June 25, 2013 at 10:33 am #140285Historical Forums User
ParticipantThanks Paulie_D, that is exactly what I was trying to do. I was experimenting with the span but never thought of using the after sudo element. God willing when I get home from work tonight I will play with around with your code and try to get it to work. It is a necessity that it will be fluid so it conforms to the media queries. I realized my description was not so good so I posted a new jpg to show what I am doing. It is basically a header. If you have any advice to offer in light of the new image I appreciate it. Thank you.
June 25, 2013 at 10:54 am #140292Paulie_D
MemberUpdated my codepen for left & right text: http://codepen.io/Paulie-D/pen/hBbtn
June 25, 2013 at 11:10 am #140270Historical Forums User
ParticipantNice Paulie_D, much appreciated. Thanks.
June 25, 2013 at 11:17 am #140272Historical Forums User
ParticipantThanks to everyone for your input. Also, surajnaikin I appreciate the advice about robots.txt, although this url is only for testing.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.