2 replies [Last post]
benny
Offline
Enthusiast
Last seen: 15 years 6 weeks ago
Joined: 2004-08-24
Posts: 64
Points: 0

yeah...i dont now whats up with my css, but it sucks a lot...

Situation:
I have an #info, for this id i want to define several classes to change the background-image and the position of the #info.

Code:

#info {float: right; margin: 24px 10px 0px 0px;}
#info .wegbeschreibung {display: block;font-size: 70%;font-weight: bold;padding-left: 8px;}
#info ul{list-style-image: url(pics/aufzaehlunginfo.gif) !important; font-size: 75%; padding: 140px 0px 0px 35px !important;}
#info.netzwerk {margin: 20px 10px 0px 0px;background-image: url(pics/netzwerk.gif);width: 155px; height: 200px;
}
#info.projekte {margin: 20px 10px 0px 0px;background-image: url(pics/projekte.gif);width: 155px; height: 200px;
}

Ok...the problem:
#info.netzwerk works fine, but #info.projekte doesn't.

If I change the position of the classes in the css, then #info.projekte works, but #info.netzwerk doesn't. strange ?! Or i'm just to thumb for this *beep*....

Hope you can help me, I'm damn annoyed those silly problems rip-off my time :/
greets,
ben

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 31 weeks 2 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

class won' work

Don't do it like that.

Use the #id for defining it and .classes for styling it, eg

<div id="info" class="netzwerk"> stuff </div>

Verschwindende wrote:
  • CSS doesn't make pies

benny
Offline
Enthusiast
Last seen: 15 years 6 weeks ago
Joined: 2004-08-24
Posts: 64
Points: 0

class won' work

Hey!

what exactly do you mean ?
That i shouldn't change the background-image, the height or width or the position by classes ?

Could you post me some code how you would solve this ??

thx a lot,
greets
ben