Click here to Skip to main content
15,881,852 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: How to add horizontal line under DIV Pin
Jeremy Falcon27-Mar-23 4:47
professionalJeremy Falcon27-Mar-23 4:47 
Questionfacebook and twitter share button plugins not working properly Pin
Member 1595298024-Mar-23 2:13
Member 1595298024-Mar-23 2:13 
AnswerRe: facebook and twitter share button plugins not working properly Pin
Member 1595298027-Apr-23 5:32
Member 1595298027-Apr-23 5:32 
AnswerRe: facebook and twitter share button plugins not working properly Pin
Member 1595298027-Apr-23 6:01
Member 1595298027-Apr-23 6:01 
QuestionI need ready-made web page codes in html and css / احتاج الى اكواد صفحه ويب جاهزة بلغة htmlو css Pin
Hussein Bajeham22-Mar-23 22:16
Hussein Bajeham22-Mar-23 22:16 
AnswerRe: I need ready-made web page codes in html and css / احتاج الى اكواد صفحه ويب جاهزة بلغة htmlو css Pin
OriginalGriff22-Mar-23 22:18
mveOriginalGriff22-Mar-23 22:18 
QuestionThree divs inside a div Pin
_Flaviu21-Mar-23 5:50
_Flaviu21-Mar-23 5:50 
AnswerRe: Three divs inside a div Pin
Jeremy Falcon21-Mar-23 11:39
professionalJeremy Falcon21-Mar-23 11:39 
There are a couple of ways to do this, but let's go with the flexbox method since that's something worth mastering anyway.
HTML
<html>
<head>
  <style>
    section {
      background: cyan;
      border: 2px dashed blue;
      display: flex;
      height: 100px;
    }
    section img {
      width: 50px;
      height: 50px;
    }
    section > * {
      background: yellow;
      border: 2px dashed orange;
      padding: 1rem;
    }
    section > *:last-child {
      flex-grow: 1;
    }
  </style>
</head>
<body>
  <section>
    <div>
        Tuesday
        2023-03-15
    </div>
    <div>
        <img src="//www.test.com/img/etc.png"/>
    </div>
    <div>
      text text text text text text text text text text text text
      text text text text text text
      text text 
    </div>
  </section>
</body>
</html>
By default, flexbox will do what you're looking for except for one thing. If you want the last div to take up the remaining space, then you'll need to use the last-child selector to specify that.
Jeremy Falcon

GeneralRe: Three divs inside a div Pin
_Flaviu22-Mar-23 1:23
_Flaviu22-Mar-23 1:23 
GeneralRe: Three divs inside a div Pin
Jeremy Falcon22-Mar-23 5:02
professionalJeremy Falcon22-Mar-23 5:02 
GeneralRe: Three divs inside a div Pin
_Flaviu26-Mar-23 23:23
_Flaviu26-Mar-23 23:23 
GeneralRe: Three divs inside a div Pin
Jeremy Falcon27-Mar-23 4:32
professionalJeremy Falcon27-Mar-23 4:32 
AnswerRe: Three divs inside a div Pin
Jeremy Falcon21-Mar-23 11:40
professionalJeremy Falcon21-Mar-23 11:40 
QuestionWombat and Muppet know nothing about web push notifications... Pin
WhoPinchedMyName19-Mar-23 9:29
WhoPinchedMyName19-Mar-23 9:29 
AnswerRe: Wombat and Muppet know nothing about web push notifications... Pin
jschell21-Mar-23 5:58
jschell21-Mar-23 5:58 
GeneralRe: Wombat and Muppet know nothing about web push notifications... Pin
WhoPinchedMyName21-Mar-23 7:09
WhoPinchedMyName21-Mar-23 7:09 
GeneralRe: Wombat and Muppet know nothing about web push notifications... Pin
jschell23-Mar-23 5:47
jschell23-Mar-23 5:47 
GeneralRe: Wombat and Muppet know nothing about web push notifications... Pin
WhoPinchedMyName23-Mar-23 6:11
WhoPinchedMyName23-Mar-23 6:11 
GeneralRe: Wombat and Muppet know nothing about web push notifications... Pin
jschell24-Mar-23 12:05
jschell24-Mar-23 12:05 
QuestionCenter text vertically inside a div Pin
_Flaviu15-Mar-23 23:01
_Flaviu15-Mar-23 23:01 
AnswerRe: Center text vertically inside a div Pin
_Flaviu16-Mar-23 3:40
_Flaviu16-Mar-23 3:40 
GeneralRe: Center text vertically inside a div Pin
_Flaviu17-Mar-23 1:25
_Flaviu17-Mar-23 1:25 
AnswerRe: Center text vertically inside a div Pin
Richard MacCutchan17-Mar-23 1:47
mveRichard MacCutchan17-Mar-23 1:47 
GeneralRe: Center text vertically inside a div Pin
_Flaviu17-Mar-23 3:51
_Flaviu17-Mar-23 3:51 
GeneralRe: Center text vertically inside a div Pin
Richard MacCutchan17-Mar-23 4:20
mveRichard MacCutchan17-Mar-23 4:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.