Jump to content

Header image


Ruud Hermans

Recommended Posts

OK, here it goes, I hardly used CSS in the past and want to start with it now.Far as I'm aware isn't it possible to create your own tag that you could use in a file to call an image and center it?If I'm right could some one give an example of this feature?Ruud Hermans

Link to comment
Share on other sites

OK, here it goes, I hardly used CSS in the past and want to start with it now.Far as I'm aware isn't it possible to create your own tag that you could use in a file to call an image and center it?If I'm right could some one give an example of this feature?Ruud Hermans
You can't create your own tags with css, but you can create your own classes and apply them to existing html tags.In this example i have said - center the contents of all divs only if they have class "image". (i made this up, image could be called potatoes or whatever!)
<head><style type="text/css">div.image {text-align: center}</style></head><body><div class="image"><img src="http://www.w3schools.com/images/w3default80.jpg"></div></body>
There are of course many ways to do one job with css :)
Link to comment
Share on other sites

Call me crazy but soon as I do:

body {background-image: url('afbeeldingen/afbeelding1.gif') no-repeat fixed center; }

My image is gone from my page.I need to set it as a background and center it on the page vertically but when ever I try to add something to it it dissapears for some wierd reason.Ruud HermansHum, yeah got it forhot to put a ";".An other question is there any way you can use CSS to make the image a watermark?

Link to comment
Share on other sites

Call me crazy but soon as I do:
body {background-image: url('afbeeldingen/afbeelding1.gif') no-repeat fixed center; }

My image is gone from my page.I need to set it as a background and center it on the page vertically but when ever I try to add something to it it dissapears for some wierd reason.Ruud Hermans

You have said background-image but added other values, remove -image and it should work.try
body {background: url('afbeeldingen/afbeelding1.gif') no-repeat fixed center; }

http://www.w3schools.com/css/tryit.asp?fil...ycss_backgroundbackground can have all thesebackground-colorbackground-imagebackground-repeatbackground-attachmentbackground-position

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...