(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-03-24 05:03 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Images in CSS?
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
Elric
Posts: 128/164
I'll let you both know when I give a damn.
MisterJones
Posts: 8/125
For a little clarification:

style is an html atrribute, providing inline "css" styling. Rather pointless, lacks a lot of control.

class is meant for generic elements that would reuse the same styling. It provides eliminate ambiguosity (SP?) like treating a paragraph element different depending on context (although you could use also inherited elments styling).

id is an address for an specific unique element (like my reduncancy?) that would have one and only one instance in your page. Call it a header, a footer, a navigation bar, whatever.

Plus, divs are overused. Every html elemnt can use styling, goddammit, use proper semantics.
Black Lord +
Posts: 40/273
Originally posted by Elric
Hmm... it seems there are different ways to call things for a <div> tag... TGWD uses <div style="name">, Sukasa uses <div class="name">, and I use <div id=name> for this layout. However, for my post-Chirstmas layout, I'm using <div class=name>. That's probably the proper one...

OK, I just did a quick test on a local HTML page, and <div class="name"> was the only one that worked.

Also, as Xk said, use .banner { width: 468; height: 60; background: url('schemes/night/banner.png');} or the image won't display.


You need to go look at some CSS documentation... style/class/id are not the same thing.
Elric
Posts: 125/164
I posted the proper code you needed at the end of my post.

Although it seems you needed a .. before the schemes/ :{
Deleted User
Posts: 12/-7750
I tried what Xk said, gave me correct height/width but no picture. So I tried:
<table><td class=banner></td></table>
Same thing, correct width/height but no background...

EDIT- Nevermind, it needed:
background: url(../schemes/night/banner.png);
Thanks guys.
Elric
Posts: 124/164
Hmm... it seems there are different ways to call things for a <div> tag... TGWD uses <div style="name">, Sukasa uses <div class="name">, and I use <div id=name> for this layout. However, for my post-Chirstmas layout, I'm using <div class=name>. That's probably the proper one...

OK, I just did a quick test on a local HTML page, and <div class="name"> was the only one that worked.

Also, as Xk said, use .banner { width: 468; height: 60; background: url('schemes/night/banner.png');} or the image won't display.
Xkeeper
Posts: 542/5653
background: url("bullshit");
Sukasa
Posts: 142/2068
maybe try div class="banner" or something similar to that? I know for accessing all of my CSS settings, I use "class", not "style".
Deleted User
Posts: 11/-7750
I was wondering how you would code an image in CSS so that if you put <div style=banner></div> (Or somthing along that lines.) it would show the picture supplied in the CSS file. I know this is possible since I used to use it in my layout (I don't recall why.. >_> ) but I was thinking something like this would work:

.banner {
content: url('schemes/night/banner.png');
width: 468;
height: 60;
}
(With: <div style=banner></div>

I was wrong. The reason I want to do this is because I have broken my board up into seperate areas (Not AB so don't say: OMG LEIK THIS SHOULD BE IN AB PROGRRAMMNIG!) and for each area it loads a different CSS file therefore making it possible to make the banner change through CSS. This can easily be done in MySQL but I would prefer it in CSS just because it would be easier in my view.
Acmlm's Board - I3 Archive - Programming - Images in CSS?


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.011 seconds; used 352.40 kB (max 392.46 kB)