CSS - Is There A Way To Have A Different Background Image In The .content Area
is there a way to have a different background image in the .content area on different pages?
this is the site: http://bradleyrose.net/WaterStreetRestaurant/pages/catering&parties.html cobble-stone-road-4.jpg is used on all pages, is there a way to use a different image on some pages? Similar TutorialsHi, Is there a relatively simple way to place an image over the main background of a site, on the right of the main design? For example, see how the Keller Williams logo is on the right, over the background he http://www.groundedgroup.com/client...Interface3.html Ideally, I want to make it happen he http://www.groundedgroup.com/clients/NWR/ It would be great if the image was always just a little bit to the right of the main design, like shown above. Any ideas? Thanks. I was wondering whether there is someway to fix the area of a content in CSS so that it wont expand if too much text was entered, just similar to the html code that fixes the area of the table. i.e. Code: <table style="table-layout: fixed;"> This code lets the table stay in a fixed size no matter how much text is entered... Here's the url Template Any comments on the code will be very helpfull. Even if it is out of topic. In IE it looks pretty good. In firefox the border goes under the large image and the image navigation is left there naked on the body background. hello all, i recently tried to implement a layout which fills the available screenspace, with the main content area as scrolling box. I thought i succeeded, because firefox shown no problem, but when looked in IE, IE is very slow to render it, making it just unusable. I've been looking for a way around ,but i'm out of luck so far, so i thought i'd seek advise on this forum. Maybe you can tip me in the right direction ! An image is worth a thousand words, so please have a look at the attached image, it summarizes the screen structure. As you can see, the only scrollable area is the center orange zone : "viewport". thank you for your time and help ! Alexandre Hi, Can anyone recommend how best to how to dynamically constrain amount of Text/Content in a DIV area that can vary in size?? That is, say you have: (a) a content (DIV) area on your view that can expand/contract depending upon browser size ( i.e. when someone is re-sizing the browser window) and (b) dynamic text/content that is to be displayed, based upon user input - e.g. image a defined area/size for several user comments for example. Users can create their own comments, but you only want them to be able to take up a given amount of screen resource, and then perhaps have a "...more" link at the bottom if they go over. How can I best setup this up? e.g. (1) How to setup the layout/CSS so that if more text / content is present in the DIV area that can be displayed that the DIV area doesn't expand due to the extra content the user put forward, and/or (2) Do I need to also complete this by programming what content comes out? E.g. in Ruby on Rails say then the question would be how to calculate how much text/content can fit in the current size of the DIV (noting browser re-sizing) so that you get the chance to put the "...more" link at the bottom? Hopefully this approach isn't required. Any other suggestions welcome that address what I'm trying to do are welcome, which is really offering a area for display of user feedback where each piece of feedback has a maximum area it can take on the main screen only, and also that browser re-sizing is possible. Tks Greg i want to add styles to the text area content such as bold, itallic, indent, color and size (like our fourms Post new Thread text area). how is it possible wating for ur reply bye Hi there, I have a content glider script, but I have added it to a wrapper with a background image. The css is using a white background colour so when a new layer is glided up, it covers the one underneath it. However, I want the background to be transparent to show the background image underneath.... If I remove the white background, they layers become transparent and overlay each other, so you can see all text in the layers on top of each other making it impossible to read. Is there anyway I can make it so it has a transparent background, but so it will not show the content under the new slide? This is my CSS: PHP Code: .glidecontentwrapper{ position: relative; /* Do not change this value */ height: 230px; /* Set height to be able to contain height of largest content shown*/ overflow: hidden; } /* Total wrapper width: 350px+5px+5px=360px Or width of wrapper div itself plus any left and right CSS border and padding Adjust related containers below according to comments */ .glidecontent{ /*style for each glide content DIV within wrapper.*/ position: absolute; /* Do not change this value */ background: white; visibility: hidden; width: 330px; } /* Total glidecontent width: 330px+10px+10px=350px Or width of wrapper div itself (not counting wrapper border/padding) */ .glidecontenttoggler{ /*style for DIV used to contain toggler links. */ width: 360px; margin-top: 6px; text-align: center; /*How to align pagination links: "left", "center", or "right" background: white; /*always declare an explicit background color for fade effect to properly render in IE*/ } Any help would be great! Thanks. I just can't do it!!!! I need help on this.. My header.. I can't get rid of the spaces around the image.. hmm check this out.. I can't post a link direct but its on the world wide web at piedmontred (dot) com firebug is telling me its an element.style margin, but for the life of me I can't find that in any CSS sheet I have.. and for some reason firebug doesn't identify a sheet either.. I did buy this wordpress template and have done quite a bit of CSS hacks, but I just can't figure this one out.. Thanks for any help!! Todd Can anyone suggest how I make sure the green 'Quick Contact' graphic/box always sit at the bottom of the right column (immediately above the Footer), no matter how much text there is in the lefthand column on this web page: www.ultimate-system.com/index.html , using css? The stylesheet I'm using is found at www.ultimate-system.com/style.css. Many thanks Hello I thought I could make it, but what I got so far is jumping over the screen, so please a need some help. I got a image with two transparant shapes. Behind those shapes I would like to show 2 other images. |-------1-------| | |-----| |----| | | |...2..| |..3..| | | |____| |____| | |_____________| Image 1 should be on top z-Index Image 2 should under image 1, a part of the image should be visible. Image 3 should under image 1, a part of the image should be visible. Now the issue, image 2 and 3 should be dynamically replaceable. Please help Thanks I'm in the middle of learning CSS and have come along alright for the most part. I have two small questions though. 1) The page I'm working on is http://www.mcconaha.com/csscenter.php. It's a three-column layout, with div boxes holding various links down the right and left sides of articles that will be posted. There is a main div that all of this sits in, and that expands just fine to whatever amount of content the article may have. But if the article were to have just a samll amount of content, the div wouldn't expand to the minimum height established by the link boxes on the right and left. How do I make that happen? I just need the light grey box to expand down to the lowest point on the page. 2) Notice the small box with the yellow border in the middle. I want this to be a copyright footer, but have a similar problem. How do I make that box appear 10px below whatever the lowest point for the main div is? Basically, I need the nav boxes to push everything down. I HOPE this can be done fluidly, so I can simply add and remove boxes quickly without needing a CSS edit...that's the goal anyway...modular nav boxes. My CSS is at http://www.mcconaha.com/csscenter.css and the page is at http://www.mcconaha.com/csscenter.php (Also note that this is really all I'm asking. I'm going to clean up the rest...just roughing it out right now.) Anyway, thanks in advance. I am new to using CSS for more than just text, and I have run into a problem. What I want to do is to have an image with a margin of 3px around it. The problem occus with the background color and border in Mozilla (Fire Fox). The box dosn't fit around the image properly. Does anyone have an idea why this is? --xenite I have a layer 'main' that contains two columns - one on the left called 'left', one on the right called 'right'. Both columns are layers themselves. 'main' has a background colour 'left' and 'right' have a fixed size background image which does not repeat. JavaScript determines the size of the window and then sets the height of these three layers exactly. This is supposed to be a minimum height to ensure the page is filled initially, however I have used the following code (explained later): Code: if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myHeight = document.body.clientHeight; } // main height var pageHeight = myHeight; document.getElementById("main").style.height = pageHeight+"px"; // content height var leftHeight = pageHeight - 233; document.getElementById("left").style.height = leftHeight+"px"; document.getElementById("right").style.height = leftHeight+"px"; Content on 'right' may extend beyond the height of the page and therefore makes the page scroll. When the content in 'right' expands - it is hoped that the size of 'main' expands so that the background colour of this layer fills the space where the content overflows. Using the above JavaScript and this HTML - that works as desired in IE7. Code: <div id="main" style="position: relative; margin: 0 auto; width: 680px; background: #E1E6EA; text-align: left; padding: 0; z-index: 2"> <div id="left" style="float: left; text-align: center; margin: 0; padding: 0; width: 198px; background: #E1E6EA; background-image: url('images/left.jpg'); background-repeat: no-repeat; z-index: 3"> blah </div> <div id="right" style="float: right; text-align: center; margin: 0; padding: 0; width: 482px; background: #E1E6EA; background-image: url('images/right.jpg'); background-repeat: repeat-x; z-index: 3; overflow: inherit"> badly coded extra bit to extend the layer <br><br><br><br><br><br> gfdgf <br><br><br><br><br><br><br><br><br> gfgf <br><br><br><br>yhyuyuy <br><br><br><br><br><br> gfdgf <br><br><br><br><br><br><br><br><br> gfgf <br><br><br><br>yhyuyuy </div> </div> As the content of 'right' expands so does the background behind everything. HOWEVER - this only works in IE and not the other two test browsers: Safari and Firefox. To remedy this - I tried minHeight instead of height. The outcome of that - the background behind 'right' extends (because the background colour continues past the minHeight) but the background behind 'left' is just not shown and the background of 'main' does not extent. Therefore it has a background on the left hand side until the minHeight of 'main' then the left hand side has no background after that point. That's in Firefox and Safari. With this "solution" in IE - it goes a bit weird but since it doesn't even work right in the other two I ignore that for now. So - it either works in IE or not at all. Hence why I am currently using the code that at least works in a browser. Any suggestions to get it working in all? The layout I have going is a bit difficult to explain. Here's a diagram.. The area of importance is the header. The content and main head area are centered. The area to the left and right of the header are a <div>. However, as you can see, the background image on the left is different than the one on the right. I'm having difficulty making this work. the images can be stretched horizontally without a problem, but the two sides must meet in the middle beneath the header. I hope this makes sense. What I've got to do, I think, is tell the background image of the underlying <div> to stretch to 100%, and make this image 300px wide or so including both sides of the image and a split. The split would hide behind the header. I can't find a method to stretch the background image, though. Does anybody know of a better way, or a way to achieve this method at all without getting into completely different layouts? Thanks in advance for any assistance/suggestions. I'm using the CakePHP framework to build my site. I hope I'm not asking an impossible question and being since I'm new an all.. Anyways I finished a simple design well I thought it was simple anyway until I tried to make the content box to be a fluid width. Here's what it's supposed to look like. http://planet-rpg(dot)com/PR_style.png // yes I know I'm a new user.. Here's what I currently have. http://planet-rpg(dot)com Here's my coding. html Code: <?php echo $html->docType('xhtml-trans'); ?> <html> <head> <title>Planet RPG::. Imagine a creative universe : <?php echo $title_for_layout; ?></title> <?php echo $html->css('styles'); ?> </head> <body> <div id="top_bar"> <p>top bar</p> </div> <div id="body"> <div id="header"> <p>Header</p> </div> <div id="page-wrap"> <ul id="navigation"> <li class="first"><a href="/games/">Games</a></li> </ul> <div id="frame"> <div id="container"> <div id="main_content"> <p>Content area</p> </div> </div> </div> </div> </div> <div id="footer"> <p>footer coding</p> </div> </body> </html> css Code: html { background: #2b435d; } html, body { margin: 0; } body, table { color: #303030; } img { border: 0; } #body { background: #d8dde8; padding: 0 0 16px; } #page-wrap { min-width: auto; margin: 10px auto; } #frame { margin: 0 auto; padding: 0px 1170px 0px 220px; margin-top: -17px; } #main_content { background-color: #fff; } #header { background: url("../img/header.png") repeat-x bottom left; height: 64px; margin-top: 36px; } #navigation { background: url("../img/navigation.png") repeat-x bottom left; height: 31px; margin-top: -20px; font-family: "Arial", sans-serif !important; font-size: 14px; color: #fff; text-shadow:-1px -1px 0 black; list-style-type: none; padding:1px 5px 1px 220px; } #navigation li { float: left; } #navigation li a { border-left: 2px solid #303030; text-shadow:-1px -1px 0 black; color: #D0D0D0; font-size: 14px; font-weight: bold; text-decoration: none; display: block; height: 21px; padding: 6px 12px 1px; } #navigation li a:hover { color: white; text-shadow:-1px -1px 0 black; } #navigation li.first { padding-left: 236px; margin-left: -236px; text-shadow:-1px -1px 0 black; } #navigation li.first a { background: url("../img/cursor.png")bottom center no-repeat; height:24px; color: #6193c7; border: 0; text-shadow:-1px -1px 0 black; } #logo { width: 166px; height: 50px; margin-top: -32px; margin-left: 20px; position: absolute; z-index: 2; } #footer { background: #607080 url("../img/footer.png") repeat-x; height: 60px; padding: 30px 0; clear: both; } #top_bar { background: url("../img/top_bar.png") repeat-x bottom left; height: 36px; font-family: "Arial", sans-serif !important; font-size: 12px !important; font-weight: normal !important; height: 36px; position: fixed; top: 0; left: 0; right: 0; z-index: 5; } I haven't used CSS/html in awhile but if anyone can help me either "fix" the content box so it appears like mockup which would be centered on my screen as my resolution is 2560X1600(30") and just repeat the <div's> when needed. Hope someone can help me with my question. In short, I'm trying to get this one image to tile down the page to the bottom, underneath a static background image. Basically, it's a 2pixel high image that's ready to tile vertically, just having a tough time getting it to work. You can clearly see the problem here, a gap at the bottom: http://www.groundedgroup.com/clients/NWR/ Here's the relevant css: http://www.groundedgroup.com/client...WR-GG/style.css I've googled and subsequently tried out some solutions, but no luck. Got any ideas? Thanks in advance. PS - Is there a way to keep the spiders from indexing my links above? The site is on a test server, so I don't want the url indexed. I've noticed a trend in recent CSS sites with a header, content and perhaps double footer. Each of these sections has a fixed width for the content but the backgrounds for each section are liquid and each has a unique colour. I've been trying to replicate this effect on a clients site but I just can't seem to make it work. Does anyone have any ideas? This is the technique I've been using: Code: <div id="header-fluid"> <div id="header-fixed"> <div id="header"></div> <div id="nav"></div> </div><!-- head-fixed --> </div><!-- head-fluid --> Code: <div id="content-fluid"> <div id="content-fixed"> <div id="content"></div> </div><!-- content-fixed --> </div><!-- content-fluid --> Code: <div id="footer1-fluid"> <div id="footer1-fixed"> <div id="sponsors"></div> </div><!-- footer1-fixed --> </div><!-- footer1-fluid --> Code: <div id="footer2-fluid"> <div id="footer2-fixed"> <div id="copyright"></div> </div><!-- footer2-fixed --> </div><!-- footer2-fluid --> Thanks for your time on this!! Hanek Hello, I just joined the forum, I'm new to web design although I have some experience in video post production. I'm attempting to create a layout for a website using sticky footer technique and an image for the border shadow in the main column. The sticky footer works well until I tweak the css to add the background border image, then I get this empty space in the middle of the body where the border image background should be extending to. It's probably a novice mistake but I can't get to find it. Your help would be much appreciated. The HTML: Code: <body> <div id="nonFooter"> <div id="wrapShadow"> <div id="header"> <div id="linksHead"></div> <div id="mainMenu"></div> </div> <div id="content"> <div id="bannerSlider"> (SWF file) </div> <div id="contentBuscador"> </div> <div id="contentTours"> </div> <div id="contentElite"> </div> <div id="contentTestimonios"> </div> <div id="contentPromos"> </div> </div> </div> </div> <div id="footer"> <div id="wrapShadowFooter"> </div> </div> <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> </body> The CSS: Code: html,body { padding: 0; margin: 0; } html { height: 100%; } body { height: 100%; background-color: #3399cc; } #nonFooter { position: relative; min-height: 100%; background-image: url(_images/shadow920x1ver3.gif); width: 920px; padding: 0px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; } * html #nonFooter { height: 100%; } #content { padding-bottom: 7em; width: 900px; margin-top: 0px; margin-right: 10px; margin-bottom: 0px; margin-left: 10px; padding-top: 0px; padding-right: 0px; padding-left: 0px; clear: both; border-top-width: medium; border-top-style: solid; border-top-color: #336; } #header { width: 900px; height: 100px; position: relative; margin-top: 0px; margin-right: 10px; margin-bottom: 0px; margin-left: 10px; } #footer { position: relative; margin-top: -6em; height: auto; background-image: url(_images/shadow920x1ver3.gif); width: 920px; margin-right: auto; margin-bottom: 0px; margin-left: auto; } #wrapShadow { width: 920px; margin: 0px; padding: 0px; height: auto; } #wrapShadowFooter { width: 900px; margin-top: 0px; margin-right: 10px; margin-bottom: 0px; margin-left: 10px; padding: 0px; background-image: url(_images/footerCruiseship.jpg); background-repeat: no-repeat; float: left; height: 100px; } All #content(area) Divs in content have the same code as this: #contentBuscador { float: left; height: 100px; width: 880px; padding: 0px; margin-top: 5px; margin-right: 10px; margin-bottom: 5px; margin-left: 10px; } Thank you, pixelMason. Edit: Problem Solved thanks to f_nietzsche I update the website of a local gaming center and I recently redesigned it. I am not a CSS expert and now that I have integrated it into to site, the background will not fill the screen on larger monitor sizes. When you scroll down to the bottom of the page it turns leaves a large white space at the bottom of the screen. There is also an odd white border around the site. The css can be found in the source code. The site is nextlevelchardon.com |