Please verify that you are not a bot to cast your vote.
Help SupportOur Growing Community
DOTAFire is a community that lives to help every Dota 2 player take their game to the next level by having open access to all our tools and resources. Please consider supporting us by whitelisting us in your ad blocker!
Want to support DOTAFire with an ad-free experience? You can support us ad-free for less than $1 a month!
HeyGuys , I am updating my ursa guide. I have a question though, why cant i put my sentences in the center?
Look at the spoilers below. Both of them is of the same code, but why cant the latter be in the middle? I just changed words and its no longer in the middle.
If you want to know the codes just quote this post
Spoiler: Click to view
A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match
1st, it's because you're applying centre to the columns, the individual cells and their contents don't inherit the columns' attributes. In order to apply centre to the text, you have to place centre inside the columns. Columns don't have a centre attribute, so applying it to them does nothing.
2nd, even if you centre the text, the columns are only as wide as a) you define them, b) the width of their contents.
In order to get your contents centred to the page, the columns need to be set as wide as the page (around 870ish pixxels) then you need to centre the text.
Let's fix the width first, try this:-
Xyrus hot coding action
Code:
[img]https://i.gyazo.com/73b0af4daee6d0d6550863d44cb071e9.png[/img]
[columns width=900][center][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][nextcol][i]A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match[/i][nextcol][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/center][/columns]
A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match
However, as you can see from the image above, since you have 3 columns, you need to size them all appropriately, since your image is roughly 35 x 35, set the width of the columns containing your images to 35. Since they're going to be squished into their columns, there's no need to centre them, so you only need to target the text in the middle column with centre.
Xyrus hot coding action
Code:
[img]https://i.gyazo.com/73b0af4daee6d0d6550863d44cb071e9.png[/img]
[columns width=35][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][nextcol=840][center][i]A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match[/i][/center][nextcol width=35][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/columns]
A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match
Welp, we've centred the text to the page, but the problem is that the image is not centred to the page. Here you have 3 options. Centre the image above, make more columns, or MAN UP and learn tables! 8{D
It's time to get tabular! >B{D
Xyrus hot coding action
Code:
[table][tr][td width=35][/td][td width=900][/td][td width=35][/td][/tr]
[tr][td][/td][td][center][img]https://i.gyazo.com/73b0af4daee6d0d6550863d44cb071e9.png[/img][/center][/td][td][/td][/tr]
[tr][td][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/td]
[td][center][i]A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match[/i][/center][/td][td][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/td][/tr][/table]
A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match
But wait! Let's say you want to keep the image on the left and just centre the text underneath it, rather than centring everything to the page (which is what I'm assuming you're trying to do). Then we just need to constrain the table's width to the size of the image. Remember how I said columns are only as wide as their contents unless you tell them otherwise? Tables work the same way, so let's try it:-
Xyrus hot coding action
Code:
[table][tr][td width=35][/td][td][/td][td width=35][/td][/tr]
[tr][td colspan=3][center][img]https://i.gyazo.com/73b0af4daee6d0d6550863d44cb071e9.png[/img][/center][/td][/tr]
[tr][td][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/td]
[td][center][i]A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match[/i][/center][/td][td][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/td][/tr][/table]
A picture showing the effects. Don't expect them to just stand in their place if you run to them in a real match
Unfortunately, the width of the text + 2 Ursa icons > the width of the big image. You can try shrinking the width of the table to match the image, but then the text is going to spill over onto a new line. My recommendation? Just trim a little bit of text:-
Xyrus hot coding action
Code:
[table][tr][td width=35][/td][td][/td][td width=35][/td][/tr]
[tr][td colspan=3][center][img]https://i.gyazo.com/73b0af4daee6d0d6550863d44cb071e9.png[/img][/center][/td][/tr]
[tr][td][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/td]
[td][center][i]A picture showing the effects. Don't expect players to stand their ground in a real match[/i][/center][/td][td][img]http://hydra-media.cursecdn.com/dota2.gamepedia.com/4/40/Ursa_icon.png?version=d20c48421178de74197f8576fa54eb50[/img][/td][/tr][/table]
A picture showing the effects. Don't expect players to stand their ground in a real match
2nd, even if you centre the text, the columns are only as wide as a) you define them, b) the width of their contents.
Basically, you didn't set a width for the columns, so it was only as wide as the text is was in. It's easier to see the problem if you use tables, i.e. your columns looked like this:-
DOTAFire is the place to find the perfect build guide to take your game to the next level. Learn how to play a new hero, or fine tune your favorite DotA hero’s build and strategy.
Late credits to Janitsu for the sig
Unscathed
<Editor>
Awards Showcase
Remarkable (47)
Posts: 3432
View My Blog
Hades4u
<Community Lead>
Awards Showcase
Distinguished (296)
Posts: 4707
Steam: hades4you
Xyrus
<Moderator>
Awards Showcase
Established (104)
Posts: 2429
Steam: Xyrus
View My Blog
Late credits to Janitsu for the sig
Unscathed
<Editor>
Awards Showcase
Remarkable (47)
Posts: 3432
View My Blog
Xyrus
<Moderator>
Awards Showcase
Established (104)
Posts: 2429
Steam: Xyrus
View My Blog
TheSofa
<Moderator>
Awards Showcase
Memorable (54)
Posts: 3318
Late credits to Janitsu for the sig
Unscathed
<Editor>
Awards Showcase
Remarkable (47)
Posts: 3432
View My Blog
Janitsu
<Moderator>
Awards Showcase
Memorable (74)
Posts: 1209
Steam: Cottontail Teemo
View My Blog
Xyrus
<Moderator>
Awards Showcase
Established (104)
Posts: 2429
Steam: Xyrus
View My Blog
Late credits to Janitsu for the sig
Unscathed
<Editor>
Awards Showcase
Remarkable (47)
Posts: 3432
View My Blog