The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How can i add more than one div on a link
The_webmaster
post Jun 27 2021, 05:54 PM
Post #1


Member
***

Group: Members
Posts: 40
Joined: 5-February 21
Member No.: 27,773



Please help me, I want to add two div on a line. Example <div class="menu">text1</div> <div class="cmenu">text2</div> We already know that text two will come under text1. How can i make text1 and text2 stay on the same line ?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 27 2021, 07:31 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



There are many ways. What do you want to do? Is it just two short snips of text or something more? Why do you want to use a DIV? And how does the link come into it?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 28 2021, 03:54 AM
Post #3


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



You can change the appearance with the CSS "display" property: https://www.w3.org/TR/CSS21/visuren.html#propdef-display

In this case you might use "display: inline", or "display: inline-block" if you want each DIV to have a specific width or height.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
The_webmaster
post Jun 28 2021, 04:44 AM
Post #4


Member
***

Group: Members
Posts: 40
Joined: 5-February 21
Member No.: 27,773



Thanks very much, it worked perfectly
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 04:03 AM