CSS - Css Header Images
I'm trying to get two images in my header/logo section. One is a logo with the site title etc, which I want to sit in the direct center of the header section, the other is a repeating gradient which I want to repeat across the page.
I'm struggling to get the first image to sit on top of the second. Similar TutorialsI'm new to CSS .. got the basics, but having a problem using 3 images in a header for a site ..... [---img_1 ------img_2 -----img_3----] I want img_2 to allways be centered. in the page, and img_1 and img_3 on the sides... so far I have that working .. now the problem .... I want img_1 & img_3 to scale depending on size of browser ... so that the header fills 100% of the width ..... html <div id="siteHead" align="center"> <div id="leftbar"></div> <div id="midbar"></div> <div id="rightbar"></div> </div> css #siteHead { width:100%; } #leftbar { float:left; width:100%; height:248px; background-image: url(imgs/1_01.jpg); background-repeat: repeat-x; text-align:right; } #midbar { float:left; width:778px; height:248px; background-image: url(imgs/1_02.jpg); background-repeat: no-repeat; text-align:center; } #rightbar { float:left; width:100%; height:248px; background-image: url(imgs/1_03.jpg); background-repeat: repeat-x; text-align:right; } so what am I missing ... or whats my n00b mistake ... I hope I made sense ... english is poor playing with width %'s if browser is so small the 3 images stack on each other .. I would like to prevent that from happening ... but one n00b issuse at a time.... I'm using a PHP script from A List Apart to generate a random image for my header whenever it is called. While the script is great, my image sizes need drastic reduction. These header images are composed of two parts - 1)The title text 2)A background photograph. I can increase the compression of the background photograph to get it down from 120kb to about 20kb with little notice in quality - a great improvement! However, when I do this, the text suffers a great loss of quality. Since I can save the text as a .gif which would only register about 6kb, I was wondering if there was a way I could combine the script to get the random photograph and have the text lay on top. Ive tried putting both img codes in the same div and giving the text a higher z-index, but that does not work. I know that the best-case scenario would be to just use actual styled text in the div to go on top of the photograph. But I can't get the stroked look I'd want by doing this. Any suggestions? I have a layout in which I use a <div> called #image on all pages in the site. I know this question is silly, but I have no idea how to do this: #image { margin-left: 0px; margin-right: 178px; margin-top:0px; padding:0px 0px 175px 0px; border-bottom:1px solid #003366; background-color:#f5f5f5; background-image:url(binary_liquid_2.jpg); background-position:top left; background-repeat:no-repeat; } as you can see in this div, the background image for the home page is binary_liquid_2.jpg If I wanted to maintain the same page structure, but use a differnet image in that div on each page, how do I code that? I was thinking that #image would simply provide the "box" dimensions and then I would have seperate classes for each page like .image_help .image_contact. These classes would then place a new picture in that #image div depending on the page I was viewing. IS that correct? And, wodl the HTML markup be: <div id="image" class="image_contact"> </div> is that close? please help! thanks a million jpm226@bellsouth.net Hey guys... I feel like a deer caught in the headlights here with all this content. Long story short, I'm using the kubrick default wp theme which comes with slightly rounded header edges. I've created my own header in the same format, and am using it as the background image - fair enough. However, I am interested in nesting a smaller image ON TOP of the background header image, so that my smaller header image overlaps the larger background image. I've been playing around with code, and the only thing I've been able to do, is either make the bigger background the same color as the background image (but then this merely makes the header bg color squared, not rounded edges etc). How do I overlap two images within the header section of a wp default theme? Your highly valuable feedback is appreciated. x. All, I have a header on this page backup.whiteslimo.com with 3 images inserted into it listing the company name, service, and contact info. My problem is that when they are displayed there is a thin white border on the bottom and right hand sides of each image. But the image doesn't have these borders. If you are in Firefox/Mozilla and you right click on the individual images and select View Image, you will see that the image itself does not have these borders. I am thinking that somewhere along some attribute is being added that is causing this but since I am a CSS neophyte (This is still my first week lol) I am not sure. Any help is much appreciated. I want to display text, image, videolinks in the header and footer images in my html with css.While header and footer images are displayed in the html , the intended text,image,videolinks are not displayed within the image block of header, footer.Will you please advise me the correct code in css, html to embed the text,image,videolinks inside the header and footer images. thanks Hello I am very new to CSS. One of my problems is that my web experience is only in tools that generate the code. I"m needing what I"m told is a simple thing to do, but not finding it easy for me I tried to post with some links to my site, etc, but the rules won't let me post any links. I have posted in another CSS site, but fine it very inactive and not getting any help. What I'm trying to do All items below to make up the header of the site. A background graphic which fills across the screen, no matter the size of the window. I have this working, although if I shrink the window too far, it overwrites the graphic in item 2 below. A left justified logo graphic. Working fine. A Centered graphic. I have this showing, but it is not quite centered right, and it is a bit smaller than actual, and I cannot get it to space down a bit. (tried padding, does nothing. Trying margin spaces everything down, including item 1 above. A right justified graphic. This shows, but is VERY SMALL, much smaller than original graphic, and it does not right justify. NOTES The current code, below, is based on a tutorial I went through, using % for width. The idea being that if it is built based on percent of width, then whatever width of window, it would adjust. I used 900px for original calculations. I find that it only fills the window as if it is 900 px wide. So I redid the percentages based on 1500px. I've done lots of reading, Googling, and been trying all kinds of stuff and getting not too far with it. Tried px for width too, seems worse. Here is a print screen of the header: [IMG]URL[/IMG] Sigh...sorry...even img code has a url, and even though it showed in preview, I see it will not display it in actual message. The site I"m working on is shuttermaster.co (not com), where you can see what it looks like now. CSS Code Only including the code relevant to the header issue. I do have menu code in CSS, but it is not complete, and I'm not having problems with that. Code: #myHeader {width:auto;height:133px; background:url(/photos/i-QXfPgvM/0/S/i-QXfPgvM-S.jpg) repeat-x} #myLogo { float:left; width:10%; height:150px ; margin-left:2.22%; display:inline; background:url(/photos/i-sttGP6Z/1/O/i-sttGP6Z.png) no-repeat} #myConame { width: 15.33%; height:90px; margin-left:auto; margin-right:auto; background:url(/photos/i-T3ZjJ8R/2/Th/i-T3ZjJ8R-Th.png) no-repeat} #myBanner { float:right; width: 29.73%; height:150px; background:url(/photos/i-BkhSxLJ/1/Th/i-BkhSxLJ-Th.png) no-repeat} The HTML Code Code: <div id="myHeader"> <div id="myLogo"></div> <div id="myConame"></div> <div id="myBanner"></div> <div style="clear: both;"></div> <div class="menu"> <ul> <li><a href="http://shuttermaster.co">Home</a></li> <li><a href="#">Portfolio</a></li> <li><a class="drop" href="http://shuttermaster.co/galleries" >Galleries <!--[if gte IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="http://rogerewingphotography.smugmug.com/Landscapes/Landscapes/19892237_mHBK84">Landscape</a></li> <li><a href="Link">Drop 2</a></li> <li><a href="Link">Drop 3</a></li> </ul> <!--[if lte IE 7]></td></tr></table></a><![endif]--> </li> <li><a href="#">About Me</a></li> <li><a href="#">Guestbook</a></li> </ul> </div> </div> <div style="clear: both;"></div> I hope I have been clear enough. Hoping someone can point me the right direction. Regards, and thanks.... Hi all, I need some help. I have implemented a fixed header on my site, but certain content is scrolling above the header while other is scrolling behind. I would like it all to scroll behind the fixed div's. Im just curious, what are the advantages of using css to import all your images (that arnt dynamic) as apposed to inserting them into your html using the <img> tag? Post resolved -- css controlled by unmentioned files. (apologies for duplicate post, was sure that was "edit" but must not have been) How do i stop the <h1> add white space above and below anything in the header tag. Why is the second header on his site is located at the bottom of the page, I can't seem to figure it out. Can anyone take a look at the page and maybe point me in the right direction? The url is <NO LONGER AVAILABLE> I know that is has to have something to do with #clearheader1 or #clearheader2 calls. Maybe where they are placed or something. Hi, How do I indent my H1 tag as they are too close to the edge of the page. I tried all the functions for a <p> but they dont work for headers Thanks Hello, my name is Jordan, and I run breatheheavy (can't post the URL) I have a new header designed that's 1665x515px. I am having a little trouble putting it on the website because of the current restrictions placed in Wordpress on the header.php and style.css files. When I uploaded the header and changed the settings in Wordpress, it didn't look correct on all browsers or the iPad. I was hoping to get some help from someone that could help me with this and make it compatible with all browsers / mobile version. You can see the site on an ipad simulator site (also can't post the link) Thanks for reading Sending good vibes your way, Jordan what in gods name am I doing wrong? I want the header image to scale with the web page, I can't stand how it shows the scroll bar when you resize firefox's window. themidnighter .ca/test Thanks! hi my site uses class i press, a wordpress theme (www,grimsbyforsale,com) how do i make my header bigger so my logo image does not overlap? what values on what code would i need to change i am new to all this ? Hi, I am working on a design for one of my websites and have run into a little bit of a problem. I am hoping one of you guys can help me out. I am relatively new to coding with css and have read a bunch of tutorials but cannot for the life of me figure out how to convert the following table into divs: Code: <table border=0 width=100%> <tr> <td rowspan=3>logo</td> <td rowspan=3>navigation bar</td> <td>some links</td> </tr> <tr> <td>search box</td> </tr> <tr> <td>more links</td> </tr> </table> Basically its the header part of the design, I have the rest of it done without much problems. I have tried everything but cannot get it to look like the table. Any help will be greatly appreciated. Thanks, I'm currenty working on a website, and header is really starting to get on my nerves. If you go to http://www.techtalk.l2p.net/tab/index.php you can see what I have done so far. Well, I have a few problems. When trying to log in, and you press tab to go from Username to Password, it goes to the Login link instead. After filling in the Password field, and you press Enter, nothing happens. When the browser is resized, the whole header gets messed up. I was thinking some CSS could help it work, but I have no idea where to start. Any help would be appreciated. Hello, I am trying to create a header with a background color and a padding of the text. I know that if I apply the background color to the header it will expand 100%. So I did the following: <h1><span>Header</span></h1> h1 {} h1 span { background-color: #252525; color: #D2D2D2; font: normal 1.2em/1.8 Verdana, Geneva, sans-serif; letter-spacing: 0.1em; padding: 0.8em; } But now I am not able to apply the top and bottom padding. How should I create this header? Thanks, Miguel I need help with a div header issue. I have a background image in the main header (#header) that has a link associated with it. I'm trying to place a smaller div tag (#ping_header) that floats in the bottom-right (over the #header ) which is pointing to another link. When I place the second div, it's inheriting the a href properties for the #header. How do I get the #ping_header to NOT assume the #header properties and assume it's own properties? It's driving me crazy! Anyone know what I'm talking about? Regards, Corrie |