How can i add more than one div on a link |
How can i add more than one div on a link |
The_webmaster |
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 ?
|
pandy |
Jun 27 2021, 07:31 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 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?
|
Christian J |
Jun 28 2021, 03:54 AM
Post
#3
|
. Group: WDG Moderators Posts: 9,665 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. |
The_webmaster |
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
|
Lo-Fi Version | Time is now: 11th May 2024 - 03:29 AM |