cosmoshell Posted October 5, 2009 Share Posted October 5, 2009 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <style type="text/css"> #top { width:400px; height:300px; } #top { position:absolute; top:0px; left:0px; } #bottom { width:400px; height:300px; } #bottom { position:absolute; top:50px; left:0px; } </style> </head> <body> <div id="top"> <iframe src="content.html"></iframe> </div> <div id="bottom"> <iframe src="http://www.google.com"></iframe> </div> </body> </html> trying to get a bar that stretches across the top screen. and no matter what I change the dimensions to It dosent alein right. how can I make it so that when the browser scales it does too? Quote Link to comment Share on other sites More sharing options...
RussellReal Posted October 5, 2009 Share Posted October 5, 2009 width: 100%; edit: oh yeah, wrong forum for this question Quote Link to comment Share on other sites More sharing options...
cosmoshell Posted October 5, 2009 Author Share Posted October 5, 2009 width: 100%; edit: oh yeah, wrong forum for this question oops lol Quote Link to comment Share on other sites More sharing options...
stublackett Posted October 7, 2009 Share Posted October 7, 2009 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <style type="text/css"> #top { width:400px; height:300px; } #top { position:absolute; top:0px; left:0px; } #bottom { width:400px; height:300px; } #bottom { position:absolute; top:50px; left:0px; } </style> </head> <body> <div id="top"> <iframe src="content.html"></iframe> </div> <div id="bottom"> <iframe src="http://www.google.com"></iframe> </div> </body> </html> trying to get a bar that stretches across the top screen. and no matter what I change the dimensions to It dosent alein right. how can I make it so that when the browser scales it does too? Just had a look at your code there. Not sure fully on what you're after (Which DIV) to go across the screen. But you will need to set the element to a percentage of the screens' width. Quote Link to comment Share on other sites More sharing options...
haku Posted October 7, 2009 Share Posted October 7, 2009 Kind of how they already figured that out in the two posts before yours? Quote Link to comment Share on other sites More sharing options...
RussellReal Posted October 7, 2009 Share Posted October 7, 2009 Kind of how they already figured that out in the two posts before yours? w0rd, but also <div> tags default to 100% so he might be referring to another div inside of a div with a fixed width, in which case he'd need to set the new div's width to 100% and its position to absolute, but that would overlap any divs which were supposed to be above it so you'd use some padding etc Quote Link to comment Share on other sites More sharing options...
stublackett Posted October 8, 2009 Share Posted October 8, 2009 Kind of how they already figured that out in the two posts before yours? Woopsie :-\ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.