- This topic is empty.
January 4, 2019 at 11:23 pm #280953kosmanParticipant
I am trying to center a small horizontal line under my text, but in some way it does not end up centered. My guess it has something to do with different type of header. I am using beaver builder and when I click on the horizontal line it says it is a different header then the header i am using H2, is there a way to style the HR in the same style as header 2?
thanks for your time
January 5, 2019 at 1:27 am #280954BeverleyhParticipant
First issue… I haven’t a clue what beaver builder is and I’m not sure that the regulars here will either. We’re the kind of folks who write and work with code from the ground up, so we can advise on HTML, CSS or whatever, but we’re unlikely to know how beaver builder fits in to things, or it’s capabilities.
Second issue… We can’t diagnose an image; we’d need to see the associated code to be able to suggest how to centre it. You can provide the necessary HTML and CSS in a much reduced CodePen demo. Note that we don’t need your whole codebase (or a link to a live website); we just need a very small sample to illustrate the problem specifically noted here. You can use the developer toolbar (F12) to inspect the problem element and extract the pertinent markup and styles from your live website.January 5, 2019 at 1:58 am #280958kosmanParticipant
Hi thanks for your help,
see the css code below
h2 style=”text-align: center;”>TEST
hr style=”width: 5%;” />January 5, 2019 at 4:02 am #280961BeverleyhParticipant
A CodePen demo please… we need the HTML and CSS that applies to those elements and we need to see it showing the actual problem. Making an observation from what’s provided, there is nothing to suggest you’ve tried to centre the
hrin those inline styles — maybe try autoing the left and right margins? — but we don’t know what other CSS is in play in order to suggest anything useful. Please use the developer toolbar to extract the relevant code from what you see when viewing your live website – that’s F12 in most browsers. Unfortunately, guessing wastes our time as well as yours, and folks won’t mock up loosely relevant demos for you because there’s a good chance they won’t work as expected. We need to see your code. Help us to help you.
General help: try Googling “how to center an element with CSS” and try some of the code you find on your travels.
- The forum ‘CSS’ is closed to new topics and replies.