CSS help 

Can anyone who is good at CSS help me with this. I'm trying to do the first image (have an underline between the two lines, to the length of the text on the first line) and the closest I've gotten is the second one. Here is my current code, if it helps at all:

h1.title1 {
text-align: center;
text-indent: 0;
font: 165% "Assiduous";
font-weight: bold;
border-bottom: 2px solid #333;
display:inline;
}
h1 {
text-align: center;
text-indent: 0;
font: 165% "Assiduous";
font-weight: bold;
line-height: 1.2
}

· · Web · 2 · 2 · 0

CSS help 

@The_T it's kinda hard to do this without a container around the titles, but it's pretty simple with a flexbox container jsbin.com/sukupub/edit?html,cs

CSS help 

@codl Hmm... for whatever reason, it's not doing that, so I'm not sure if it's a limitation of the CSS/HTML used by ebooks... even if I copy and paste my entire style sheet into that page you showed, it works on yours but not on mine. On mine, the line just covers the entire page length instead.

idk.

CSS help 

@The_T huh. you mean like an ebook reader? i guess those have limited css support, idk

CSS help 

@The_T ive edited it (same url) not to use flexbox, maybe that will help? otherwise i have no idea

CSS help 

@codl are you sure it's the same URL? I'm getting the same thing there

CSS help 

@codl lol nope it's still giving me the flex one. idk!

CSS help 

@The_T ok well weird but basically it's just

.titles {
text-align: center;
}

.titles h1 {
margin: 0;
display: inline-block;
/* font: ...; */
}

.titles h1:first-child {
border-bottom: 2px solid #333;
}

and an additional <br> between the two titles

CSS help 

@codl not sure if I'm not putting the <br> in the right spot but:

(also, tried something else and that didn't do it either)

CSS help 

@The_T no it's like
<div class=titles>
<h1>blah</h1>
<br>
<h1>blah</h1>
</div>

CSS help 

@codl ...I didn't know the tags work like that, but..

IT WORKED

<3 <3 <3 <3 <3 <3

Sign in to participate in the conversation
Radical Town

A cool and chill place for cool and chill people.