I need educational on span css
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
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
-
- Joomla! Explorer
- Posts: 253
- Joined: Sat Nov 17, 2018 1:52 pm
I need educational on span css
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
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
-
- Joomla! Hero
- Posts: 2954
- Joined: Sun May 04, 2008 12:37 pm
Re: I need educational on span css
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
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
-
- Joomla! Explorer
- Posts: 253
- Joined: Sat Nov 17, 2018 1:52 pm
Re: I need educational on span css
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?
You do not have the required permissions to view the files attached to this post.
- Per Yngve Berg
- Joomla! Master
- Posts: 30929
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: I need educational on span css
Do you use Bootstrap in your template and which version?
There is Bootstrap version 2, 3 and 4
https://getbootstrap.com/2.3.2/
There is Bootstrap version 2, 3 and 4
https://getbootstrap.com/2.3.2/
-
- Joomla! Explorer
- Posts: 253
- Joined: Sat Nov 17, 2018 1:52 pm
Re: I need educational on span css
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?
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Sep 26, 2019 11:30 am
Re: I need educational on span css
use bootstrap classes
- Per Yngve Berg
- Joomla! Master
- Posts: 30929
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: I need educational on span css
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/
https://getbootstrap.com/docs/4.3/layout/grid/
-
- Joomla! Enthusiast
- Posts: 154
- Joined: Sat Sep 21, 2019 7:29 pm
- Contact:
Re: I need educational on span css
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).
<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).