Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have a div width: 100% with inside <h1></ h1>
with a mobile device if I switch from portrait to landscape, the text that is inside <h1></h1> not widens.
why?
if I put the text outside <h1></h1> works and widens.
thanks
Depends what styles you have on your H1 element. You have a link to your site or can you create a reduced case in Codepen?
#content h1{font-size:1.1em;margin:0;font-weight:bold;}
A link to the actual site would be better but text doesn’t “widen” anyway.
I’m wondering how you expect this to change.
Also, it’s rarely necessary to float an element that has 100% width.
if the text is outside <h1> work why?
A link to the actual site would be better.
Text doesn’t widen…elements do, so I suspect that, in some way, the element’s width is being ‘restricted’ but I’m still not clear on what ‘widening’ actually looks like.
I deleted float:lef but not work.
the text remains as in the vertical position does not expand
Seriously, if we can’t see it on a live site, I’m not sure we can help you.
not in public
you email address?
Nope…not in public.
You can always obscure the web link by using bit.ly
I forgot to write this:
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#content{width:100%;text-align:center;color:#000;padding:0px 5px 0px 5px;}
the problem is the padding!
how can I fix it?
Can’t say it enough…without seeing it in the actual live environment it’s hard to help.
Not sure why padding would be an issue but you may need to address it with an orientation media query.
so it works
padding:0px 0px 0px 0px;
or so it works
.title{width:98%;}
mmmm
I give up.
If you found something that works, good for you..but I’m done repeating myself.