Michael34 Posted April 5, 2015 Share Posted April 5, 2015 This is my code: #section{ h1{Font-family:"IM Fell English"; color:black; font-size: 18px;background-color:white;text-align:justify;> width:1440px; float:left; padding:5px; <div style="background-color:transparent;background-repeat:no-repeat;background-position:left top; background-size:1400px 2400px; background-image:url("http://i1056.photobucket.com/albums/t365/gonzalo_gomez_fernandez1/images_zpswxcfc86w.jpg")></style>} Help would be greatly appreciated. Thanx in advnce... Link to comment Share on other sites More sharing options...
dsonesuk Posted April 5, 2015 Share Posted April 5, 2015 Well adding a html element with inline stying, in css declation is not going to work now is it. Look at tutorials on adding background image. Link to comment Share on other sites More sharing options...
Michael34 Posted April 5, 2015 Author Share Posted April 5, 2015 I have looked on tutorials. Here is my new #section{ position: absolute; width: 1386px; height:1496px; background-color:transparent; h1{Font-family:"IM Fell English"; color:black; font-size: 18px;text-align:justify;> <img>:(URL=http://s1056.photobucket.com/user/gonzalo_gomez_fernandez1/media/pergaminos%20en%20blanco1_zpscecz9grg.png.html][IMG]http://i1056.photobucket.com/albums/t365/gonzalo_gomez_fernandez1/pergaminos%20en%20blanco1_zpscecz9grg.png(/IMG)(/URL)</img> } (still not working) code: Link to comment Share on other sites More sharing options...
dsonesuk Posted April 5, 2015 Share Posted April 5, 2015 (edited) You may quickly glanced, rather than looked, and still not understood.You are repeating the same mistake i mentioned before, and now inserting selector with declaration within another selector with declaration.LOOK PROPERLY AT w3schools.com TUTORIALS, AND UNDERSTAND, its explained cleary there how to use css correctly without us having to repeat it.http://www.w3schools.com/css/css_background.asphttp://www.w3schools.com/css/css_image_gallery.asphttp://www.w3schools.com/css/css_text.asp Edited April 5, 2015 by dsonesuk Link to comment Share on other sites More sharing options...
tejasamrute Posted April 6, 2015 Share Posted April 6, 2015 @michael....u have messed up your css.... This is the correct way to write css #section{ position: absolute; width: 1386px; height:1496px; background-color:transparent;}h1 { font-family:"IM Fell English"; color:black; font-size: 18px; text-align:justify;}img { background-images:url('path to your image');} Link to comment Share on other sites More sharing options...
dsonesuk Posted April 6, 2015 Share Posted April 6, 2015 img tag does not use background image. Link to comment Share on other sites More sharing options...
dsonesuk Posted April 6, 2015 Share Posted April 6, 2015 background-image: not background-images: Link to comment Share on other sites More sharing options...
Michael34 Posted April 10, 2015 Author Share Posted April 10, 2015 Tezzo: I have tried your code and replaced the url, but without results, thank anyway for your interest and effort. dsonesuk: I know that i must add a DIFFERENT file clled something.css but that also doesn't solve the matter I wonder if there is any way to solve the problem Link to comment Share on other sites More sharing options...
Lucy Posted April 10, 2015 Share Posted April 10, 2015 (edited) Do you realise you're mixing CSS and HTML in your examples? They're different languages, they don't work together like that. Edited April 10, 2015 by Lucy Link to comment Share on other sites More sharing options...
dsonesuk Posted April 10, 2015 Share Posted April 10, 2015 dsonesuk: I know that i must add a DIFFERENT file clled something.css but that also doesn't solve the matter You don't have to create css file, you just have to create valid css code and only css code not mixture of css and html code, as already mentioned 3 to 4 times now it is invalid, and not how css tutorial teaches you if you look. Link to comment Share on other sites More sharing options...
Michael34 Posted April 11, 2015 Author Share Posted April 11, 2015 Sorry i am square-headed sometimes. I will learn and try again. Thank you for your hints Lucy and dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now