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

  • Home
  • SEARCH
  • 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 8873705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:31:54+00:00 2026-06-14T18:31:54+00:00

Is it possible to style DIVs so they look like follows: with simple code

  • 0

Is it possible to style DIVs so they look like follows:

enter image description here

with simple code

<div class='menubar'><div class='menu'>item1<br/>item2</div>...</div>

This is for menu. I wish just to resize selected DIV.

The features should be follows:

1) DIVs are placed from left to right without specifying absolute positions.

2) DIVs are taller than container DIV but don’t stretch it

UPDATE

Please explain with DIVs or SPANs, I failed to use LEFT with them. I need to learn, not get ready solution.

  • 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-14T18:31:56+00:00Added an answer on June 14, 2026 at 6:31 pm

    This is pretty basic stuff.

    1) don’t use divs, use a list
    2) float the child element

    <ul class='menubar'>
       <li></li>
       <li></li>
       <li></li>
       <li></li>
    </ul>
    

    and the according css:

    ul.menubar{
       /*some fancy css*/
       height:<x>px; /* is needed since it would collapse otherwise*/
    }
    ul.menubar > li{
       float:left;
       /* more fancy css */
    }
    

    Here you go with a fancy demo.

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

Sidebar

Related Questions

I have two divs, they look like this: <div style="float:left;">blah</div> <div>blah1</div> In screen resolution
Is it possible to show and hide divs like scrolling style with mousedown() from
Possible Duplicate: JavaScript library to create div-style window within page I would like to
I use the following code on my page: <div id=itemstable class=item_type1> ...other divs here...
My code creates CSS divs with dynamic names i.e. cke_record_body_19 cke_record_body_54 Is it possible
I want to style DIVs in the following way for menu: Where red is
I have a list that goes like this: <div class=item>1</div> <div class=item>2</div> <div class=item>3</div>
Is it possible to apply a style to the outer div in this example,
Here's the HTML <div class=panel id=Panel1> <fieldset style=position: absolute; top:8px; left: 136px; width: 136px;
I have nested divs like this (pseudo code..) <div0> <div1></div1> <div2>fluid width</div2> <div3></div3> </div0>

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.