Jump to content

HELP (again)! text backgrounds!?


aND|e

Recommended Posts

Mimika help! I can't understand what the book says on what to do about changing the text's background. its says type background: then type transparent or color, where colors is a color name or hex color. and if i want, i can also use an image by typing url (image.gif) instead. in this case i want to use an image. can you tell me what's the exact css code for this? i'd really appreciate it!

Link to comment
Share on other sites

http://www.w3schools.com/css/css_background.aspIn your case:p {background-image: url('image_name.extension');background-color: #??????; /* Color to use if image for some reason doesn't render */}orp {background: url('image_name.extension') #??????;}
Link to comment
Share on other sites

hmm..i think it worked but the image was so small i had to check twice if it was the image or just dirt on my screen. haha! what if i just want it on 1 paragraph on my page Jonas? Correct me if I'm wrong but the code you posted will make every paragraph on my page have the same text background image, is that right? and how do i position the image and paragraph on the page? thanks a bunch!

Link to comment
Share on other sites

p#id_name {background: url('image_name.extension') #hexdeclaration;position: absolute;left: ?px; /* Pixels from the left */top: ?px; /* Pixels from top */width: ?px; /* Paragraph width, if you want to make sure it's the same width as your picture */height: ?px; /* Paragraph height, if you want to make sure it's the same height as your picture /*}<p id="id_name">Text with background image...</p>

Link to comment
Share on other sites

If its for the background add this into your css filebackground-repeat: no-repeat;

Link to comment
Share on other sites

well if you just see 1/4 of the img then its to big. I thought the img was repeating(need more coffee).well how big is the img. and how big you want the page to be ?I'd recomend 1024x768 (standard size this time iam awake hehe) then just make the picture the same size then its 100% fitand about the paragraph background-repeat: no-repeat;this will just make the background to not repeat it self in x or y for thouse who got bigger screens its ###### to see repeats hehe hope it gets in use ^^x=horosontaly=verticalbtw do you got a link to your work I'm kinda curius :)

Link to comment
Share on other sites

haha..ok i'll give it a try..actually its not the background for the whole page..i just want a paragraph to have a background (instead of using a color, i want to use an image). i'm still a little embarrassed since im just doing basic stuff. i just started learning about a couple of weeks ago :) as soon as i have everything organized ill start giving the link when i ask for help..haha! so basically i just want a background for my text, not the whole page :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...