Welcome Guest ( Log In | Register )



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Free Code Snippets And Css Layout
Vyoma
post Sep 4 2006, 05:22 PM
Post #11


Cosmic Overlord
Group Icon

Group: Members
Posts: 571
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:45.66



QUOTE(jlhaslip @ Sep 4 2006, 08:49 PM) *

No. The HTML is the information that you want to present to the user. The Image belongs in the HTML portion of the page.
The CSS is a method which alters the presentation of the information, not the information itself.
Therefore, to add an image to the page, it must be in the HTML and not the CSS.


That would be quite right jlhaslip. CSS is meant for presentation, and it styles the HTML content. So, where one would put a image depends on what it is? Is it a content or is it a styling element. Now, if it is a content, then it definetly should go in with the HTML content in a <IMG> tag. But if it were a styling image, it should get hooked with one of the HTML tags, and go in to the background-image property.
Go to the top of the page
 
+Quote Post
yordan
post Sep 4 2006, 08:40 PM
Post #12


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,242
Joined: 16-August 05
Member No.: 7,896
myCENTs:56.55



QUOTE
and go in to the background-image property.

And what is the syntax for putting a background image property in a css sheet ?
Go to the top of the page
 
+Quote Post
TavoxPeru
post Sep 5 2006, 01:47 AM
Post #13


Super Member
Group Icon

Group: [HOSTED]
Posts: 806
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579
myCENTs:0.57



QUOTE(yordan @ Sep 4 2006, 03:40 PM) *

And what is the syntax for putting a background image property in a css sheet ?

The syntax to putting a background image property in a css sheet is:
CODE

background-image: url('full_or_relative_url_of_the_image');

Take in mind that this is the most simple syntax to put an image as a background, the full syntax covers:
  • background-attachment
  • background-color
  • background-image
  • background-position
  • background-repeat
BTW, the 'background' property is a shorthand property for setting the individual background properties at the same time ('background-color', 'background-image', 'background-repeat', 'background-attachment' and 'background-position').

Take a look to the official CCS2 specification at: Offical W3C CCS2 Specification

Best regards,
Go to the top of the page
 
+Quote Post
Habble
post Sep 14 2008, 04:28 AM
Post #14


Premium Member
Group Icon

Group: [HOSTED]
Posts: 286
Joined: 17-June 07
From: Tasmania
Member No.: 22,699



I dont have a clue what you are talking about sorry also whats the big deal with css i have never used css and problly never will
Go to the top of the page
 
+Quote Post
yordan
post Sep 15 2008, 01:24 PM
Post #15


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,242
Joined: 16-August 05
Member No.: 7,896
myCENTs:56.55



QUOTE(Habble @ Sep 14 2008, 06:28 AM) *
I dont have a clue what you are talking about sorry also whats the big deal with css i have never used css and problly never will

A lot of people use css sheets. It's a way of formatting your web pages layout, without having to re-define your page layout in each html file.
If you don't like it, of course, you don't use it.
I don't use it, and my pages are not so nice as other people's pages are.
If you want to do ugly things, write down your html pages all by yourself.
If you want to have something nice, professional-looking, you buy a nice css layout or you choose a free one or you ask a friend to create one for you.
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Basic css code(2)
  2. Code To Send An Email From A Form(10)
  3. Div Tags Vs Tables For Layout(10)
  4. Simple Java Script Code For Print Pages(0)
  5. Website Layout(10)
  6. Table Layout Vs. Css Layout(18)
  7. Need Help With Floating Layout!(11)
  8. Jscript/html/css Code Help(8)
  9. Free Shoutbox? HTML, Flash or PHP Code(24)
  10. I Need Help With A Code: Myspace Profile Css(5)
  11. To Hide Your Source Code(13)
  12. Blogger Code Problems(1)
  13. Home Videos(4)
  14. 3 Column Css Layout(13)
  15. Code Improvement And Optimization(2)
  1. The Step Up. A Guide For Myspace Design(2)


 



- Lo-Fi Version Time is now: 5th December 2008 - 05:34 PM