Various CSS Questions
Shadow_Wolf
![]()
Joined: 2004-04-03
Posts: 181 |
![]() |
I'm starting to get the hang of the CSS. There are still some things that I'm having trouble with. I've noticed that with an embedded page I've had to figure out which styles to use to give the same effect as stand alone G2. One of the things I'm having trouble working with is the picture frames. Embedded URL: http://www.protoculturex.com/test/index.php?ind=private If you notice by going to the Stand-Alone URL that it is using shadows and the images are centered. Originally I got the embedded to center using: .giAlbumCell { text-align: center; } Now that I've tried to use the frames the center alignment no longer works. Not to mention the frames aren't showing up. When I'm viewing the Stand-Alone in Firefox I pulled up the .css and usually I can just C&P that into my Embedded stylesheet. I tried that with the frames but that didn't seem to do any good. Am I using the wrong style code for it? img.ImageFrame_image { border: medium none ; vertical-align: bottom; } table.ImageFrame_shadow { direction: ltr; } table.ImageFrame_shadow .RRT { background: transparent url(http://www.protoculturex.com/test/gallery2/modules/imageframe/frames/shadow/RRT.png) no-repeat scroll 0%; height: 10px; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; } table.ImageFrame_shadow .RR { background: transparent url(http://www.protoculturex.com/test/gallery2/modules/imageframe/frames/shadow/RR.png) repeat-y scroll 0%; width: 7px; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; } table.ImageFrame_shadow .RR div.V { width: 7px; } table.ImageFrame_shadow .BBL { background: transparent url(http://www.protoculturex.com/test/gallery2/modules/imageframe/frames/shadow/BBL.png) no-repeat scroll 0%; width: 9px; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; } table.ImageFrame_shadow .BB { background: transparent url(http://www.protoculturex.com/test/gallery2/modules/imageframe/frames/shadow/BB.png) repeat-x scroll 0%; height: 7px; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; } table.ImageFrame_shadow .BR { background: transparent url(http://www.protoculturex.com/test/gallery2/modules/imageframe/frames/shadow/BR.png) no-repeat scroll 0%; width: 7px; height: 7px; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; } table.ImageFrame_shadow td { font-size: 1px; } td div.H { width: 1px; height: 0pt; } td div.V { width: 0pt; height: 1px; } The text for the Previous and Next, what css is used for it, is that abNavBar? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
why are you copy/pasting css instead of using what G2 tells you it needs? (returned in headHtml from embed api...) |
|
Shadow_Wolf
![]()
Joined: 2004-04-03
Posts: 181 |
![]() |
Because I don't know know and understand what you are talking about. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
from docs/EMBEDDING, which i assumed you've read.. Quote:
$g2data = GalleryEmbed::handleRequest(); |
|
Shadow_Wolf
![]()
Joined: 2004-04-03
Posts: 181 |
![]() |
Yes I've read docs/embedding multiple times. However I am not a programmer so I don't fully understand all of it. Not to mention $g2data['headHtml'] does not work. I however got it to work with {$data['css']}. One of the main reasons for my C&P all the .css into one style sheet was so I had greater control and understanding of the .css used. Between the portal, website, gallery, arcade, comic management system, and games there are a lot of .css files. By having everything centralized into a couple .css allows me easier ability to edit. Not to mention G2 utilizes .css is both themes and layouts and espcially when learning which items effect what and do what, it becomes time consuming to have to edit, upload, switch directories then refresh to see what was effected. When it is easier to have a centralized .css, edit, upload, refresh and not needing to navigate between multiple directories. Currently by using {$data['css']} it is not located in the <head of my document because there isn't a way to do that in the current module that I'm using. I'm not sure how validation will handle that but I haven't gotten to that point yet. Not to mention not all programs that G2 gets embedded in would let them load an outside .css without editing its own source-code as well. G2 is being designed with the intent to do no modifications to its own code, so that when updating those changes won't need to happen again. In the same aspect other programs shouldn't have to be modified in order to have to be modified to call upon functions in G2. A lot of modifications to my page is done through the .css. If I modify the portal to also include G2's .css in its head then then when I upgrade that part I would also again have to re-edit those sections to allow it to utilize G2s css within itself. That is why I have everything in seperate stylesheet, then after upgrades I just need to modify the .css path without having to worry about re-linking multiple .css or modifying it so it is able to call upon $g2data['headHtml']. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
1. GalleryEmbed::init if (isset($g2moddata['headHtml'])) { list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['head Html']); } |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
- a single css file is for most bigger projects to unflexible. usually, the problem is split up into some smaller problems. layout isn't the same as theme. it's good to be able to change them independently. - a single css file for G2 and the application it is embedded in is by far the most inflexible approach. what if the layout/theme of the cms is changed? what if the G2 layout/theme is changed?
But the other application (lets call it emApp) has to feature a minimum set of functionality to be able to integrate G2 without making changes to emApps core code. Adding additional css/javascript to the <head> part of the generated pages is one of these features. Modern CMS have this feature. Bottom line: |
|