Recent Topics

1 Sep 04, 2007 17:46    

My b2evolution Version: 10.2

I need help with my css popup photo attempt.

This was my original post... before I figured out what my real problem was (but not the solution):

I have been working with some css to do a simple popup picture (click on a thumbnail... get a big pic). It works great if I do it as an html file and include the css in the html file. It also works when I create an external css file to use with my html file.

It does not work when I put the same css (from my external css) into one of the b2evolution style sheets (associated with a skin)
.
I have used this method in the past (first try in html file, then transfer my css to B2evolution)... but, in this case it's not working either way when "calling" an external style sheet.

I have prepared a simple demo.

Works great: http://samredman.com/popuppic/index6.html (has css inside the html file)

Also works great: http://samredman.com/popuppic/index5.html (calls same css from exteral stylesheet... same as when tested in B2).

Here is the link to the css sheet I prepared (which is the same as I attempted to add to one of my b2evolution skins styles.css):

http://samredman.com/popuppic/popuppic.css

Latest edit to this post:

All of that earlier post... was from me not really understanding what the problem was. Here is the problem stated correctly:

That popup css which I described works perfectly (normally). In a later post I give a link to the blog showing it working. It's when I add a hack that does some fancy page numbering... that the popup css quits working). Scroll to the bottom for the last post update.

I am NOW able to duplicate the problem... I was way off base when I first wrote this... but it still relates to that same css and the same popup code...I just understand now why I am having the problem... Scroll to the end for the latest.

3 Sep 04, 2007 18:07

Thanks.. ¥åßßå I edited that l now.

What do you think I'm doing wrong here with with putting iit into B2evolution style sheet?

4 Sep 04, 2007 18:10

I'm always accused of being obtuse :p

In your html you refer to the latter link ( which is a 404 ), either change the link or rename the file to suit ;)

¥

5 Sep 04, 2007 18:18

Ok darn.. I was the one being obtuse. I couldn't see the error even with your example.

Now.. why doesn't in work in B2?

6 Sep 04, 2007 18:21

The chances are that with b2e you forgot about <base> ( which points to the current skins folder ;) )

¥

7 Sep 04, 2007 18:22

I am going to edit my original post... and maybe show the demo in b2..

8 Sep 04, 2007 18:32

ok, I'm probably still being obtuse ( tad hard to tell without a link to the blog page where it fails ;) )

but, in your html you use this :

<link rel="stylesheet" href="popuppic.css" type="text/css"  />

but, b2evo has a <base> tag which makes that link relative to your skins folder ( /skins/custom/popuppic.css is what gets "seen" )

¥

10 Sep 05, 2007 00:46

Ok ¥åßßå.. I can reproduce my problem...

It seems that it came from merely my own convoluted css hacking that had produced some conflicts... I am going back to basics and rebuilding some of my css files and I am on the road to having it solved.

Thanks for your help.

Well finally, I figured out the problem... but not the solution:

I found that when I have two css definitions groups in my css file that are probably conflicting because they have similarities that one will override the other.

I have prepared a file with these two groups. If I have them in separately, they both work as designed. If both are in, then only the "button" css group works. Could you take a look at this file and tell me a way I could get both "sets" to work in the same css file?

You can see it here:

http://samredman.com/testdemo/examples/cssexamples.txt

This txt file contains two css groups which can't be in the same css file without conflict. Separately they work well. If both are in only the "button" css will function.

11 Sep 06, 2007 00:08

ok, you win the obtuse war :p

it'd help if I *knew* what your problem was, I have no idea what I'm meant to be seeing ;)

btw, this part of your css needs sorting

div.button img { 
border: none; 
width: 120px; 
height: 90px; 
); 
float: left)

¥

12 Sep 06, 2007 03:55

Thanks.. yabba (yes, that css needed fixing, or "sorting" as you say ... across the pond).. but that didn't do it. I will fix up a nice demo illustrating the problem (and what examples of the code being used).

In the meantime, I got it to work by changing the class name of that set of div class css from "button" to "zebra" which, of course, makes no sense to me.., but it worked. Later tonight (or tomorrow, I will fix up that demo). I am very anxious to see what you think is making that incompatiblity.

13 Sep 06, 2007 04:09

samredman wrote:

I found that when I have two css definitions groups in my css file that are probably conflicting because they have similarities that one will override the other.

The last one in line will we executed or rather: seen. It's just top down to determine the order.
In certain cases this comes in handy because you can override general styling with a style declaration on the page or an inline style.

Good luck


Form is loading...