#226922 - 10/29/0211:04 AMDifferent image per stylesheet ?
jmydde
Newbie
Registered: 08/29/02
Posts: 23
Loc: London, England
I want a different graphic to appear at the top left of each stylesheet used - is this possible - I cant remember where I set the forum logo to start with either?!
Use images as backgrounds for a table or layer and then you can change them via .css <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />Also, I haven't tried this but I believe it should work, try putting a transparent gif where you want it and change the background of the gif to the image you want via .css (this may only work for newer browsers though)
#226925 - 11/16/0203:20 AMRe: Different image per stylesheet ?
[Re: dlhanso]
AllenAyres
I type Like navaho
Registered: 03/10/00
Posts: 25448
Loc: Texas
Examine our css http://www.threadsdev.com/threads/php/stylesheets/infopop.css toward the bottom and you'll see what he means - the background-image url{etc stuff <img src="/forum/images/graemlins/smile.gif" alt="" /> Ask again if that's not clear enough <img src="/forum/images/graemlins/smile.gif" alt="" />
The doctor said not to think very much , its dangerous<br /><br /> <img src="/forum/images/graemlins/smirk.gif" alt="" /><br /><br />I looked the css file but I haven't found where to put the logo.gif in the upper left like here<br />
#226927 - 11/16/0204:51 PMRe: Different image per stylesheet ?
[Re: dlhanso]
AllenAyres
I type Like navaho
Registered: 03/10/00
Posts: 25448
Loc: Texas
Give that section of your site it's own class, something like :<br /><br />.logo {<br /> background-image: url(http://www.urlto.com/images/logo.gif);<br /> padding: 0px;<br /> height: imageheightpx;<br /> width: imagewidthpx;<br />}<br /><br /><br />Then the section with the logo would have:<br /><br /><td class="logo"> </td>
Then the section with the logo would have:<br /><br /><td class="logo"> </td> <br /><br />You mean that I have to input this in a template file ?<br />Could you be more specific?<br /><br />Thanks
You mean the Generic header or the ubbt_header.tmpl ?<br /><br />I put what you told me in both files but no logo appeared. Yes I want it in the upper left corner<br /><br />Thanks
Hi, I'm trying to do this too. I have everything coded like Allen said, but I'm not seeing the graphic when choosing the style I wrote it for....Interestingly enough, the graphic is being found, cause it's in my cache - I just can't see it loading any where..... <br />(I'd also like it to be in the top left corner...) <br /> <br />Any ideas?? <br /> <br />-peter
I'm still working with this.....<br /><br />So far, I've got <td class="logo"> </td> inserted in the top of the generic header.<br /><br />Then, I have the following in the CSS file.<br /><br />.logo {<br />background-image: url(http:URLTOGRAPHIC);<br />padding: 0px;<br />height: 300;<br />width: 56;<br />}<br /><br /><br />It's still not showing up, but I am able to see the graphic file in my temporary internet files.....How weird! Anyone have any clues or general direction for this...<br /><br />-peter<br /><br />
With CSS the only images that you can load into a table cell are background images, and a background image in a table cell will: <br /> <br />1) Tile if the image is smaller than the table cell that it is in. <br /> <br />2) Get cut off if it is larger than the table cell that it is in. <br /> <br />My guess (since you didn't include the html you used for the table your logo is in) is that the cell that contains you logo is getting "crushed" and that's why you can't see it. <br /> <br />What I did for my site was to create a transparent gif file with the same dimensions as my logo, set the transparent gif as the foreground image in the cell, and then use CSS to define a background image for the same cell. The column next to my logo is set to a width of 100% so that the cell that has the transparent gif is no larger than the transparent gif itself. Then I made different logos for each style sheet on my site and added a "logo" class to all of my style sheets to load the appropriate background image. <br /> <br />View source on my site to see what I mean <img src="/forum/images/graemlins/smile.gif" alt="" /> <br /> <br />Edited cause I need a lot more coffee... <img src="/forum/images/graemlins/smile.gif" alt="" /> <br />
Not a genius <img src="/forum/images/graemlins/smile.gif" alt="" /> Just been there, done that, messed up my web site, went back to the drawing board <img src="/forum/images/graemlins/smile.gif" alt="" />
Haha....Regardless, thank you muchly...<br /><br />One last question, is there a way I can get the graphic to align with the board and everything else on the page? Right now, it's just a tad to the left of it all....<br /><br />-peter
I got it! I answered my own question! Took a while, but boy does it feel good. lol<br /><br /><img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />-peter
[]I got it! I answered my own question! Took a while, but boy does it feel good. lol<br /><br /><img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />-peter [/]<br /><br /> <img src="/forum/images/graemlins/cool.gif" alt="" />
Hi<br />I want to make 3 different logos for 3 stylesheets.I tried to follow the steps you have written but I get no logo at all<br /><br />Could you tell me what I'm doing wrong? Give me an example of generic header <br /><br />Thanks
If your trying to define a class for a logo there are many options availabe. I would research CSS image variables to option the look and feel you want but you can start with this basic class and define from there. <br /> <br />.logo { <br /> background: ; <br /> color: ; <br /> height: ; <br /> width: ; <br /> background-image: url (http://www.yoursite.com/someimage.png); <br /> <br />They posted this above. so use this in your stylesheets and define all the variables here and the image path <br /> <br />your header would look something like this <br /> <br /><table class="tableborders"> <br /><tr class="tdheaders"> <br /><td class="logo"> <br />Other header stuff here <br /></td> <br /></tr> <br /></table> <br />
Thank you very much . At last I did it :-)<br /><br />One last question<br />How can I make the logo clickable as it was ,so when I press it ,to go in the main page of the forum?