Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How can i do this?

Featured Replies

Hey guys, quick question. How can i code it so i can have a div be 100px wide, and another div take up the rest of the space?

 

.topPanel {width:100%; height:100px; border-bottom:5px solid black;}
.topPanel .miniInfo {float:left; width:100px}
.topPanel .topBar {};

 

Here is what i have so far, need help filling in the "topBar" code.

 

Thanks!

Hey guys, quick question. How can i code it so i can have a div be 100px wide, and another div take up the rest of the space?

 

.topPanel {width:100%; height:100px; border-bottom:5px solid black;}
.topPanel .miniInfo {float:left; width:100px}
.topPanel .topBar {};

 

Here is what i have so far, need help filling in the "topBar" code.

 

Thanks!

 

it should automatically fill the remaining space

 

<style>
.topPanel {width:100%; height:100px; border-bottom:5px solid black;}
.topPanel .miniInfo {float:left; width:100px; border: 2px solid;}
.topPanel .topBar {border:2px solid red;};
</style>

<body>
<div class="topPanel">
<div class="miniInfo"></div>
<div class="topBar"></div>
</div>

  • Author

it should automatically fill the remaining space

 

<style>
.topPanel {width:100%; height:100px; border-bottom:5px solid black;}
.topPanel .miniInfo {float:left; width:100px; border: 2px solid;}
.topPanel .topBar {border:2px solid red;};
</style>

<body>
<div class="topPanel">
<div class="miniInfo"></div>
<div class="topBar"></div>
</div>

 

For me it just fills up the whole panel.

For me it just fills up the whole panel.

 

you should see this

 

post-4538-0-17875700-1307814435_thumb.png

 

I have changed this

 

.topPanel {width:100%; height:100px; border:5px solid black;}

 

Just to show where the topPanel is

 

Edited by pat24

  • Author

you should see this

 

post-4538-0-17875700-1307814435_thumb.png

 

I have changed this

 

.topPanel {width:100%; height:100px; border:5px solid black;}

 

Just to show where the topPanel is

 

For me it just stretches on the whole panel...

 

Here is my code:

 

body, html {margin:0px; height:100%; width:100%}

.topPanel {width:100%; height:100px; border-bottom:5px solid black;}
.topPanel .miniInfo {float:left; width:300px; border-right:5px solid black; height:100%;}
.topPanel .topBar {width:100%; height:100px; border:5px solid red;}

.sideBar {float:right; width:250px; height:100%; border-left:5px solid black;}

 

    <div class="topPanel">
       <div class="miniInfo">
       </div>
       <div class="topBar">
       </div>
   </div>

   <div class="sideBar"></div>

 

Any ideas?

maybe I'm misunderstanding the question but why not have the 100% width div and then use z-index to stick the 100px width div where you want it? Then pad the content of the 100% width div?

  • Author

maybe I'm misunderstanding the question but why not have the 100% width div and then use z-index to stick the 100px width div where you want it? Then pad the content of the 100% width div?

 

I tought about that, but is padding really the only way? It seems like bad practice to me. Why isnt there a way i can have the 100% width div start from the edge of the 300px div to the edge of the screen?

 

Here is how it appears to me, it just disregards the side div.

 

unledcy.jpg

 

If there is no other way i will use padding but id rather not.

 

My code:

 

body, html {margin:0px; height:100%; width:100%}

.topPanel {width:100%; height:100px; border-bottom:5px solid black;}
.topPanel .miniInfo {float:left; width:300px; border-right:5px solid black; height:100%}
.topPanel .topBar {width:100%; height:100%; border:5px solid red}

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.