CSS - Header/wraparound Issue
Hello everybody,
For my home page at http://www.nextcraft.com I'm using the following syntax in the HTML: Code: <body> <a name="top"></a> <div align="center"> <div id="container"> <!-- =================================================================== --> <div id="header"> <a href="http://www.nextcraft.com"><img src="media/00_primary/menugraphics/nextcraft_banner.gif" title="Click here for the home page." height="68" width="395" alt="nextcraft logo" align="left" /></a> <div id="search_box"> </div> </div> <!-- =================================================================== --> <div id="col_left"> <ul id="navlist"> </ul> </div> <!-- =================================================================== --> <div id="content"> <!-- =================================================================== --> <div id="subnav"> <ul id="subnav"> </ul> </div> <!-- =================================================================== --> <div id="sidebar"> <div class="box" id="black"> </div> </div> <!-- =================================================================== --> <!-- TEXT AND OTHER CONTENT GOES HERE --> <!-- =================================================================== --> <div id="footer"> </div> <!-- =================================================================== --> </div><!-- END CONTENT DIV --> <!-- =================================================================== --> </div><!--END CONTAINER DIV--> </div><!--END DIV CENTERING--> </body> (On the stylesheet code, the "header" DIV has no positioning defaults, and the "search_box" code has a Code: float:right; attribute. Note two things: 1. If you resize the browser window, the search box and other elements wrap around in a logical way. 2. The logo is a link to the home page, with the "title" attribute used so that a link description pops up on a mouseover. I like that. But... I change the appearance of my site from time to time, by alternating between several stylesheets. This sometimes calls for a different header graphic. Problem: If I put the header graphic in the stylesheet as a background image, the site will appear the same, but then the header's link and title attribute cannot be used, and the search box will now pass right through the header when the browser window is resized. My goal would be to place the header graphic (including the link information) in the style sheet, and still keep the visible "title" attribute and proper wraparound behavior. Any suggestions? Thank you! Similar TutorialsHi, www.personaldevelopment.ca looks great in firefox and IE, but in konqeror/safari (i test in konq because it uses the same html rendering engine) the top left is stretched a tad further than it should. Anyone have any suggestions to fix this? I am out of ideas. http://www.uberwald.com/images/pdtop.jpg (Thanks zAlanm) Thanks. tdela Hi all. I'm having a problem with the header of my web page. I want it to extend across the entire page but can't seem to get it to do so. When I change the width, the header extends to the right only. the url is spatterblog, can view using firebug the css is: #header { background: #e75c14 url('images/img02.gif') repeat-x center center; } #headerimg { margin: 7px 9px 0; height: 192px; width: 100%; #headerimg .description { font-size: 1.2em; text-align: center; } #header { background-color: #e75c14; margin: 0 0 0 1px; padding: 0; height: 200px; } I'm having two issues with IE on my site. 1. IE is displaying the body background image (bg.jpg) throughout the entire page. 2. IE is pushing the sidebar way down. Neither of these issues exist in Firefox. I think the second issue may have something to do with the first issue. Here is the relevant code. Code: html,body * { padding:0px; margin:0px; } body { background-image:url(images/bg.jpg); background-repeat:repeat-x; background-color:#fb7d21; margin:0 auto; height:100%; } div#container { width:792px; margin:0 auto; background-image:url(images/filler.jpg); background-repeat:repeat-y; } div#header { width:792px; height:109px; background-image:url(images/header.jpg); background-repeat:no-repeat; margin-top:20px; } div#content { float:left; width:570px; padding:0 0 0 10px; margin-top:-40px; } div#sidebar { float:right; width:212px; margin-top:-95px; } div#footer { clear:both; width:792px; height:84px; background-image:url(images/footer.jpg); background-repeat:no-repeat; } You can see the issues on my site here. Any idea what is causing this? Thanks in advance. 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. WHAT IS THE TYPICAL CSS PROBLEM FOR THIS ISSUE? w w w. jaywayproductions . c o m/portfolio/work_history.html It suppose to look the way it looks in IE. It is a little off in Firefox. I have been try'n several things to solve this particular issue but cannot. It seems as if the bottom and top row stretches and makes the effect I was trying to accomplish look off in FF. You can understand what I'm sayin' when you view both. Does anyone know why it is doing this? Any help would be greatly appreciated! Hi everyone, For years I've been using tables solely to position elements on web pages but it's come to my attention that this is now "frowned" upon in the web community so I figured if I'm going to start doing things the more common way (with DIVs) I might as well start now. I'm not a professional website developer (C programmer here...eek! haha), but I do part time web work for some important clients of mine. So I have a very simple layout done with DIVs/CSS to start (code at the bottom). The problem is when you render it you'll see a large gap between the bottom of the layout and bottom of the page. My hypothesis is that this is due to where the "DIVs" would normally have been, except I moved them around. It sounds very similar to the problem encountered he http://forums.devshed.com/css-help-116/how-to-remove-blank-space-at-bottom-554773.html but I don't see what he did to solve it. Note that ultimately what I want is only the "header" and "footer" to have a fixed width/height. The leftcol and content should have fixed widths, but height grow with what ever is in them. And it should be centered in the page the way it is now. I tried various "text-wrap" and "height: 100%" and a few different codes but no luck. I really don't want to have to give up on DIV's but I am finding them a tad frustrating . I've altered the code from here (http://www.devarticles.com/c/a/Web-Style-Sheets/DIV-Based-Layout-with-CSS/3/). I tried "floating" them but that didn't seem to help either or is messes up my centering, plus I don't want it expanding to different resolutions. Thanks in advance if you can give a DIV newbie a heads up. Code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>TWO-COLUM FIXED LAYOUT WITH FIXED BOXES</title> <style type="text/css"> <!-- #header { background: #0f0; position: relative; z-index: 1; top: 0px; left: 0px; width: 800px; height: 100px; } #leftcol { background: #f00; position: relative; z-index: 2; top: 0px; left: -325px; width: 150px; height: 600px; } #content { background: #ff0; position: relative; z-index: 3; top: -600px; left: 75px; width: 650px; height: 600px; } #footer { background: #0f0; position: relative; z-index: 4; top: -600px; left: 0px; width: 800px; height: 100px; } --> </style> </head> <body style="margin: 0pt;"> <div align="center"> <div id="header">Header Section</div> <div id="leftcol">Left Section <p align="left"> Test </p> </div> <div id="content">Content Section</div> <div id="footer">Footer Section</div> </div> </body> </html> Hello I am having difficulties with a site I am working on. First, if you look at it in IE and roll your mouse to the right of the site the whole thing shifts to the left. No idea why it does this. Second: In Firefox it looks like a disaster! Help! http://www.tombraiders.net/katie/shelly/index.html User: letme Pass: in Thank you! Hello Guys, I am trying to get the the css to work but having a hard time with it and need some help.. Here is the content lined up in fire fox. http://content.screencast.com/users/dank2009/folders/Jing/media/4198ca5c-6c75-4196-a2e7-ba1c423caca7/2011-08-22_1550.png Ad this is what it looks like in IE (See my issue) http://content.screencast.com/users/dank2009/folders/Jing/media/c9f0dcd6-19c9-48f6-83f8-9c55d7417fcc/2011-08-22_1551.png Here is the code Code: echo '<div class="listing"><img src="'.$listing_photo.'"><span class="listlink"><a href="index.php?content=subcats&id='. $listing_id.'">'.$listing_title2.'</a></span><br><span class="listbody">'.$listing_body2.'<span class="readmore"><a href="index.php?content=subcats&id='. $listing_id.'"> Read more</a></span>>>></div>'; Here is the CSS Code: .listing { width:560px; height:auto !important; margin: 0 auto; text-align: left } .listlink { float:left; margin-left: 10px; margin-top: 20px; position: absolute; text-decoration:underline; } .listbody { float: left; margin-left: 110px; margin-top: -30px; width:440px } .listingdiv{ border-bottom: 2px dotted #9EABB5; color:#FFF; } Please advise how to fix this.. Thanks for your help in advance.. Dan 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, 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 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. 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! 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. 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. 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 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 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 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. |