Help changing rendering order of a couple of Divs
Mallycat
Joined: 2012-05-11
Posts: 14 |
Posted: Fri, 2012-05-11 23:54 |
Hi, I'm new here and would like some help. I have some experience with MVC apps and CSS, so I am not a novice. I have taken a copy of Clean_Canvas theme and I am currently customising it to resemble a wordpress theme I use for the rest of my site. Wordpress: http://boroniaparkframing.com.au/ I have successfully made progress with the layouts in the theme CSS. Now I need to (I assume) move into the Gallery php and make some changes. I have some questions and need some help. 1. I want to move the Div g-info to render inside the Div g-album-grid (so it looks like the wordpress site). I can't find where these Divs exist in the php. I have downloaded a copy of the entire gallery3 folder to my PC, and searched for the text using windows search, but still couldn't find it. Can someone help me find where these divs exist? That is enough to get me started. If someone can help with these things, I could probably finish it off. Thanks in anticipation. Matt |
|
Posts: 8339
There is another way, using jQuery to embed G3 http://www.flashyourweb.com/gallery2/embed_samples/g3_ajaxGallery.php
-s
Posts: 14
Yes, that is very nice, but I am trying to set up an online shop.
Can anyone help me with my questions?
Posts: 27300
@g-info, I don't see that in the source of my test install so I would suspect it comes from your theme.
yes, album.html.php
You could move it to page.html.php and wrap it in a if album check.
@g-site-menu,
css:
make the 160 0
add a width attribute if desired.
@changes in php for your theme, create a copy of your theme and use it. If you are changing other php files you have to create a MY_xxxx.php of the file. See the grey dragon theme for examples of how it overrides other core code.
4: should work: http://codex.gallery2.org/Gallery3:Themes#Duplicate_and_deploy_your_copy_of_the_default_theme
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
Floridave
I have made some progress- thanks
I am now trying to render an image before and after the nav bar. I have added this code immediately after the #g-site-menu css. Trouble is it is not rendering. I have no idea why - this is the same code used in wordpress.
The second issue I am having is that I can't find the CSS for the actual menu items. I am looking for g-menu-link and sf-with-ul and I can't find them in any of the gallery files. I don't actually understand WHY I can't find them, nor how to go about finding them. I have searched for the text using windows search, but for some reason that never seems to work. Any advice on how I can improve my efforts to find the CSS code I am looking for would be appreciated. I use Firefox inspector to find out the name of the css I need to find.
Posts: 27300
I think the syntax for background images is
background-image: url("http:/boroniaparkframing.com.au/images/nav-left.png") no-repeat;
I have not played much with the :before and :after selectors so your not going to get much from me.
not sure how it works with un-ordered lists <ul>
The menu is a list.
#g-site-menu is in gallery3/themes/yourtheme/css/screen.css
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
OK, thanks. I have tried all the conceivable permutations but can't get anything to work (with before/after).
Posts: 1857
Wouldn't it be easier to just add the image to page.html.php?
If, for some reason, you MUST do it with css, combine both images as one (with transparent space between, for the nav menu), enlarge the height of the nav to accommodate the images, then add the appropriate padding to the top/bottom.
There are better ways, but all of the css plays together. This also avoids me having to look at the whole before/after thing; not sure what browsers that works in.
Posts: 14
Thanks. That's a good idea. The before and after is the way it is done in wordpress, and that allows for modifications to the width of the site. But given my width is already decided, I can take the approach you suggest.
Posts: 8339
to render absolute positions within an element and not globally the parent div needs to have its position defined ie.
http://css-tricks.com/absolute-positioning-inside-relative-positioning/
-s
Posts: 14
Thanks for your help. I have tried this and it didn't work. But I am now thinking that maybe there is something different wrong. This is what I have.
For some reason this background image is not rendering at all. I have tried everything I can think of, including the full path of the image. If I change the colour, it updates just fine. I have tried background-image: as an alternative, but that doesn't help. So why wouldn't this image be rendering if the colour is working?
Posts: 1857
I didn't look long enough to figure out why, but the background is set to:
url("http://boroniaparkframing.com.au/events/themes/clean_canvas/css/http://boroniaparkframing.com.au/events/themes/clean_canvas/images/nav-bg.png") repeat scroll 0% 0% rgb(143, 77, 179)
Posts: 14
So how did you find what the background was set to? I have changed it, I hope it is right now, but it still doesn't render.
Posts: 1857
It's now set to:
url("http://boroniaparkframing.com.au/shop/themes/clean_canvas/css//images/nav-bg.png") repeat scroll 0% 0% rgb(143, 77, 179)
That URL gives a 404 (with and without the double slashes).
You can use any number of tools to check style definitions. I've never used firebug (for firefox), but that's the one I hear the most about and new users seem to figure it out quickly.
Posts: 14
Hey, thanks a lot for the tip. Firebug looks really good and helped me solve this problem (first step anyway). I have got the bg image happening, can now see that the before and after css code is not rendering into the live CSS. I will take a look at that when I have more time. If anyone has any ideas why that code doesn't come through, I would be please to hear from you. Could it be a CSS version issue?
Posts: 27300
Could be a doctype issue
WP has
<!DOCTYPE html>
G3 has:
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
I have got the background image fixed thanks to the tips and firebug. What is now interesting (using Firebug) is that not all the CSS is showing in Firebug
so I have this
but this is what firebug shows
So any ideas why:
1) the #g-site-menu:before is missing
2) the image reference in the "after" is missing