I need educational on span css

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
shaibustephen
Joomla! Explorer
Joomla! Explorer
Posts: 253
Joined: Sat Nov 17, 2018 1:52 pm

I need educational on span css

Post by shaibustephen » Wed Sep 11, 2019 9:23 pm

I am customizing my article category. I want an instance where it creates only two columns up and three columns down.
The three down columns should be of equal size but the top two columns should be at a ratio 30/70 peent width.
How do I achieve this using span?
The column should collapse if there is nothing in it to avoid empty blank space

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2954
Joined: Sun May 04, 2008 12:37 pm

Re: I need educational on span css

Post by waarnemer » Thu Sep 12, 2019 7:58 am

you don't by using span..

https://www.w3schools.com/tags/tag_span.asp

you use div

https://www.w3schools.com/tags/tag_div.asp

but maybe better to look at https://www.w3schools.com/html/html5_new_elements.asp for structural elements..

then check https://www.w3schools.com/css/css3_flexbox.asp on how to arrange all elements

shaibustephen
Joomla! Explorer
Joomla! Explorer
Posts: 253
Joined: Sat Nov 17, 2018 1:52 pm

Re: I need educational on span css

Post by shaibustephen » Fri Sep 13, 2019 11:21 pm

I am not too knowledgeable on using css. How do i use flex on the sample url you sent to me to get the below screen shot on my custom article category?
Screenshot.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30929
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: I need educational on span css

Post by Per Yngve Berg » Sat Sep 14, 2019 8:09 am

Do you use Bootstrap in your template and which version?

There is Bootstrap version 2, 3 and 4

https://getbootstrap.com/2.3.2/

shaibustephen
Joomla! Explorer
Joomla! Explorer
Posts: 253
Joined: Sat Nov 17, 2018 1:52 pm

Re: I need educational on span css

Post by shaibustephen » Thu Sep 26, 2019 12:09 am

i am using bootstrap.4.3.1. How do i use this span as it doesn't have such css? what is the preferable way to get this done?

Findozor
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Sep 26, 2019 11:30 am

Re: I need educational on span css

Post by Findozor » Thu Sep 26, 2019 11:34 am

use bootstrap classes

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30929
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: I need educational on span css

Post by Per Yngve Berg » Thu Sep 26, 2019 1:43 pm

Bootstrap 4.3 does not have the span anymore. The syntax have changed. It's col-xx-yy.

https://getbootstrap.com/docs/4.3/layout/grid/

helpwithjoomla
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 154
Joined: Sat Sep 21, 2019 7:29 pm
Contact:

Re: I need educational on span css

Post by helpwithjoomla » Sat Sep 28, 2019 8:47 pm

Here's how you would do the code with bootstrap 4 and div's:

<div class="container">
<div class="row">
<div class="col-4">
1/3 of the container
</div>
<div class="col-8">
2/3 of the container
</div>
</div>

<div class="row">
<div class="col">
1 of 3
</div>
<div class="col">
2 of 3
</div>
<div class="col">
3 of 3
</div>
</div>
</div>

The class "col" is what divides each row horizontally. Since there are 12 columns, you divide the first row into 4 columns and 8 columns. The second row results in 3 equal columns (4-4-4).


Locked

Return to “General Questions/New to Joomla! 3.x”