Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8049919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:55:20+00:00 2026-06-05T06:55:20+00:00

How to mark up the page without javascript? Both HTML elements (div1, div2) must

  • 0

How to mark up the page without javascript?
enter image description here

Both HTML elements (div1, div2) must to have fixed size.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:55:22+00:00Added an answer on June 5, 2026 at 6:55 am

    You have to work with the CSS attributes
    position,
    top,
    bottom,
    left,
    right and
    height.
    E.g.

    <div style="position:absolute; left:0; right:0; top:0; bottom:0">
        <div style="position:absolute; left:0; right:0; top:0; height:42px; background:green">div1</div>
        <div style="position:absolute; left:0; right:0; bottom:0; top:42px; background:red">div2</div>
    </div>
    

    http://jsfiddle.net/GPHEx/1/

    • position:absolute lets you determine the layout in pixels and percent (roughly speaking).
    • left:0; right:0 make it full-width.
    • top:0 aligns a div to the upper edge.
    • bottom:0 aligns a div to the lower edge.
    • height:42px and top:42px define the tiled layout.

    Vertical example:

    <div style="position:absolute; left:0; right:0; top:0; bottom:0">
        <div style="position:absolute; top:0; bottom:0; left:0; width:42px; background:green">d i v 1</div>
        <div style="position:absolute; top:0; bottom:0; right:0; left:42px; background:red">d i v 2</div>
    </div>
    

    Example with four tiles:

    <div style="position:absolute; left:0; right:0; top:0; bottom:0">
        <div style="position:absolute; top:0; height:80px; left:0; width:42px; background:green">d i v 1</div>
        <div style="position:absolute; top:0; height:80px; right:0; left:42px; background:red">d i v 2</div>
        <div style="position:absolute; top:80px; bottom:0; left:0; width:42px; background:red">d i v 3</div>
        <div style="position:absolute; top:80px; bottom:0; right:0; left:42px; background:green">d i v 4</div>
    </div>
    

    Notice how top+height resp. left+width work together.
    You could have more tiles as well by adding the previous height to the next top.

    With overflow you can define what should happen if there is too much content. overflow:auto adds a scrollbar to the div if needed. overflow:hidden would crop it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a section of an html page that I want to display in
Mark Edington mentioned a Memory Manager called, SafeMM at the DelphiLive conference. I have
Given the following MVC mark-up: <p> <label for=forenamesLabel>Forename(s):</label> <%: Html.TextBoxFor(model => model.ConsultantRegistrationDTO.Forenames) %> <%:
What is the mean of On Page SEO? Is it related to mark-up ,
I have been tasked with improving the current mess that is our JavaScript strategy;
I have a highly dynamic single page interface where various user events trigger new
My asp.net page dynamically displays 207 questions (I can't control this). Each question have
Javascript containing errors sometimes does not execute without any error message. The following line
I have one page and it's encoding is UTF-8 and If i try to
I have a page with formated text and a toolbar (images with click events)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.