HTML - Padding In Div Layers/divs Overlapping?
Okay, so as you can see from this page:
http://ggmdolly.com/headersample.php The only problem with the page is that the text is overflowing out of the supposed layout area. The reason for this is that if I add padding to the div, the layer's BACKGROUND IMAGE (which is the grey area plus the shading over the main background) also moves, and looks really messed up. So I need to know how I can add padding to the text - what way is there? I tried making a new div layer within the div layer that contains the background - but the div doesn't 'stretch' for the text so the background doesn't repeat itself, if you get what I mean. Any solutions? My code looks like this: <div id=layer2 style="position:absolute; top:348px; left:276px; width:785px; z-index:2; padding-left:0px; padding-right:0px; padding-top:0px; background-image:url(http://ggmdolly.com/divbackground.png);"> <body> (Body text) </body> </div> Similar TutorialsHi, if you take a look at the following page: http://www.vub.ac.be/ARCH/reis.php you will see that - in IE - the footer overlaps with the content layer. in FF everything is ok any ideas? thanks Dear HTMLForums.com! I'm currently new to designing pages from scratch, and i have some questions about how to "frame" your website in Dreamweaver. So, i found out that AP-divs would let you draw layers / boxes, but at the same time, it doesent center the content of the AP-divs on every computer. It kind of has a fixed position, wich of course, if viewed on a different monitor, then would not center. (if the layer is placed at W:300px and H:400 px, then it would not be centered on every viewers screen) Is there any way i could get the same posibillities, where the content would be centered in any browser, on any resolution etc.? If there is any function in Dreamweaver that would let me design boxes etc. to get somewhat of a structure on the page, while also making the boxes centered, etc. Sorry for describing my problem so badly, i really don't know how to explain properly. Cheers. Hello people. I am desiging a web framework and that requires me to create overlapping divs. They will be absolutely positioned and I am planning on using the DOM to allow the user to select which one to take precedence and create special effects with. Kind of like how the windows work in MS Windows with the frames overlapping each other Can someone kindly give me some CSS or JavaScript or any clues as to how I might do this? Thanks in advance and regards, mintsmike http://completely-gaga.com/ hi i want to make it so that my image fader sits ontop of my header, i've set the positioning of where i want it to be and tried z-index, but it's still not working. any idea what i need to do? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <STYLE> #mp { border:1px solid #999; width:300px; background-color:#222; color:#999;} #mptabpanel { float:left; width:300px; height:400px; } #mptabcomments { background-color:#003; z-index:4; position:relative; top:0px; left:0px; } #mptablinks { background-color:#030; z-index:5; position:relative; top:0px; left:0px; } #mptabplaylist { background-color:#300; z-index:6; position:relative; top:0px; left:0px; } </STYLE> </head> <body> <!-- open mediaplayer --><DIV id="mp"> <DIV id="mptabpanel"> <DIV id='mptabcomments'>COMMENTS TAB</DIV> <DIV id='mptablinks'>LINKS TAB</DIV> <DIV id='mptabplaylist'>PLAYLIST TAB</DIV> </DIV> </DIV><!-- close mediaplayer --> </body> </html> The three divs, "mptabcomments/links/playlist" are supposed to occupy the exact same position. (Only one of them will be visible at any time.) I've tried relative positioning and altering each div's z-index but my brain seems to have switched off here! I can't use absolute positioning because this layout is part of a bigger layout which itself is going to be absolutely positioned around the screen and I don't want to have to manually update each contained div's position every time the parent div is moved. Hi to all, I am creating an event planner which means that I have a calendar like in html generated by server side script, with users created events stored in a database that are displayed with floating divs that can span across many days. Events can be added/edited at any time by many users, and I can not modify the way they add or modify it. Therefore I can have many events on any day and an event can last an indefinite number of days. The problem is that some of the event will overlap, is there any way in html /css to prevent the <div> with absolute position to overlap without any javascript ? Thanks a Million, Alex Hello, thanks for stopping by to help me out. I'm making myself a website at the moment, and I'm using divs to create the layout. I've got it looking the way I want in IE but there's a glitch with Firefox. I'm using php include to insert the header (which is a container div with two divs inside - stacked horizontally) on the top of all pages. With IE this works fine, but in Firefox the div in the main page containing all the body and text overlaps onto the header. I've taken two screenshots if you want to take a look to see what I mean: FF: http://img253.imageshack.us/img253/9...eenshotpq3.jpg IE: http://img441.imageshack.us/img441/6...eenshotgp9.jpg The page is http://www.exclusive-2-u.com/GeorgiaMarie/about.php if you want to check out the code. Thanks again! Georgia Theoretically, a webpage is made up of layers, of which some things can go on top - or bottom - of others. Does anyone here know if it is possible to change the position of them? Thanks hello all.. i am pretty new to web creation, so this question might be pretty studpid.. Anyhow, I am using layers in my website. But everytime i view it on a browser (safari, firefox, ie) they are all over the place... Sometimes its just a small displacement or something.. but the layers just dont stay where i specify them in dreamweaver. I was wondering if anyone would be able to help me fix this problem? or if there is workaround to this.. thanks Hello all together, I'm trying to build this layout: The grafics are ready. I have the 4 corners as well as 1px slices for the left, top, bottom, right sides. I don't / can't use tables as I have done in the past. I have read dozens of tutorials and know about properties like "floating", display as table by using "display: ...." but didn't make it! Apart from that do I have to look at what HTML definition I have in my files? HTML4.0 etc.? Thanks alot for any tips! I own a website at, www.Catwiskers.co.nr If you look, there are two characters on both sides of the main page. In order to position them there, I used a div position:absolute; script. Also if you notice, there is movement behind them. That's a flash movie I made, but then the movie disappears. But I also used div position:absolute; to place that there as well. How do I get the flash movie to be ONTOP of everything else on the page? Is there some sort of alpha:true or something? http://www.zouklambada.com/eventsNew.asp This is the page I'm working on. Basically i need it to work in the following way. When you click on all the images at the moment, it is working fine (sort of)- each time you click, a layer comes up over the three small ones - BUT i need the small images to stay in position and these big images to go ontop (ie. you dont see the small images in that same row - they should not jump to the bottom. There will be more rows. When a big image is displayed in first row, the second row must slip underneath. Hope this makes sense! Please help! I have this Web page I'm working on and I'm not sure on how to get the overlayed images to line up 'automatically'. Here is the code I have: <div id="main-copy"> <h3>NorthEast Regional Radar</h3> <div id="topo" style="Z-INDEX: 1; LEFT: 0px; POSITION: relative; TOP: 0px" > <img src="http://www.srh.noaa.gov/ridge/Overlays/Topo/Short/box_Topo_Short.jpg" border="2" alt="Topo Base" ></img> </div> <div id="radar" style="Z-INDEX: 2; LEFT: 0px; POSITION: relative; TOP: -555px"> <img src="http://www.srh.noaa.gov/ridge/RadarImg/N0R/box_N0R_0.gif" border="2" alt="Radar Image"></img> </div> <div id="county" style="Z-INDEX: 3; LEFT: 0px; POSITION: relative; TOP:-1113px"> <img src="http://www.srh.noaa.gov/ridge/Overlays/County/Short/box_County_Short.gif" border="2" alt="State Borders" ></img> </div> <div id="legend" style="Z-INDEX: 4; LEFT: 0px; POSITION: relative; TOP: -1668px"> <img src="http://www.srh.noaa.gov/ridge/Legend/N0R/OKX_N0R_Legend_0.gif" border="2" alt="Legend Overlay"></img> </div> </div> You can see I've attempted to get these to line up by specifying a "-" TOP offset. Doesn't work in all cases. How do I fix this the proper way ?? Thanks. Hi all, I have a problem with two layers i want to place on top of an iframe in at table. The website: http://kvc.dk/CTC7/2.htm As you can see its positioned below the iframe. I know it can be done because i have done on this: http://kvc.dk/CTC7/index.htm The problem is that its not working in firefox. Hope you can help. Thanks Hi everyone, I was wondering if it's possible to stack images on top of each other in html so that the position of the images stacked on top are relative to the bottom image, instead of being relative to the screen edges (eg, 100 pixels above bottom of screen, 200 pixels left, etc)? I want to create a simple image menu like this: Where I have one large image on the bottom, and three image-links on top of it, aligned so that they're always in the same spot relative to the base image no matter what the computer screen resolution is. If I make them relative to the screen edges then computers with different resolutions would display the images out of order. I'm pretty new to html, using Adobe Dreamweaver CS5.5 at the moment. This is what I have so far: Code: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <LINK href="style.css" rel="stylesheet" type="text/css"> <title>Main Playlist</title> </head> <body> <!-- Layering priority low --> <DIV STYLE="{z-index:1;}"> <p><img src="pictures/baseimage.png" alt="baseimage" align="middle"/></p> </DIV> <!-- Layering priority high --> <DIV STYLE="{z-index:2;}"> <p><img src="pictures/button1.png" alt="button1" align="middle"/></p> </DIV> <DIV STYLE="{z-index:2;}"> <p><img src="pictures/button2.png" alt="button2" align="middle"/></p> </DIV> <DIV STYLE="{z-index:3;}"> <p><img src="pictures/button3.png" alt="button3" align="middle"/></p> </DIV> </body> </html> Quite obviously it's not right as I have no idea how to set the buttons so they are "X pixels from the top/bottom/left/right of the base image". Thanks! Hello, I have an image that I want to make "float" above a small green bar, so that it sticks out above it. I have been able to achieve the effect with the <layer> tag, but the problem is that it only displays correctly in Firefox and not in IE. Also, I want to avoid the layer tag since it is not universally supported. Here is an example with the layers: http://dqnmusic.googlepages.com/indexenlayer.html Here is what it looks like when I try to avoid layers: http://dqnmusic.googlepages.com/indexen.html Is there away around the layer tag that can still achieve the effect I want? Hi, I have a cell within a table and into that I would like to place 4 x layers, all on top of each other. Adjacent to this I have 4 rows in a table, each with an image - the aim is to use OnMouseOver to hide / unhide the layers depending on which of the 4 smaller images are hovered over... The problem I have is that my website uses tables (width 950px) that are centred on the screen - and with resizing the screen in different browsers, the layers go out of alignment. Is there an easy way to ensure the layers always stay within the table cell? I'm using Dreamweaver MX2004. Thank you in advance for your very kind help. Matt this issue has been solved Hi people, I have a website which allows you to switch content without a page refresh. This is done with javascript. However, the downside is, it takes much longer to load the website at the start as it has to load the whole site's content. I would like to know how I can call out content from external html files to my main div layer when a tab is clicked? This means that only the div layer refreshes when a tab is clicked. Here's what I currently have on my screen: http://img291.imageshack.us/my.php?i...4169031eq4.jpg What I'm trying to do is Save the Layers as JPEGs so I can place them into Dreamweaver and continue Editing my Webpage. I wasn't able to Edit some of the Images in Dreamweaver so I had to Edit the actual PSD File, but now that I've edited the PSD File, I can't seem to transfer the updated Graphics back to individual JPEG Form, I can only save the entire document as a giant JPEG, and that's not what I want. Slicing isn't viable either, the PSD didn't come with any... I would think it has something to do with those blue lines running across the page, but I don't know what that means? How do I save the Graphics I updated so I can transfer them into Dreamweaver? |