Jump to content

how can I make this work?


cosmoshell

Recommended Posts

<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?

Link to comment
Share on other sites

<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.

Link to comment
Share on other sites

Kind of how they already figured that out in the two posts before yours?  ;D

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.