It's been many years (decades) since I've used a horizontal rule but I don't remember that there were any problems with defining the width, either setting it to run the width of the page or a desired number of inches. I wanted to use one in an article I'm working on and simply inserting <hr /> between paragraphs gives me a short line, not much more than an inch by eyeball measurement. I want it longer. In the admin side Editor window it spans the width of the page but not on the public side. My fall back would be to make a graphic image instead of using <hr /> but now I'm curious because I don't remember how to do it.
Thank you, yet again.
- webnanny
- Commercial Templates
- Thursday, 20 August 2020
- Subscribe via email
Hello
HR tag styling may vary depending on your template but can be easily amended with some custom CSS. Would you have a URL to an example of your HR?
Ciaran
HR tag styling may vary depending on your template but can be easily amended with some custom CSS. Would you have a URL to an example of your HR?
Ciaran
- more than a month ago
- Commercial Templates
- # 1
I am also struggling with this problem. I would like a horizontal rule the width of the module, but I get a very short one when I use <hr />. I have tried entering some custom CSS, but that has not worked. I am using the Ashley template. I would be interested to know the answer to the problem.
Ray
Ray
- more than a month ago
- Commercial Templates
- # 2
Hello
@ Hemingray, What CSS rule did you try?
Like the thread creator, you should also post a link to the problem here!
What CSS file did you put it in? (Possibly the wrong template style was used?)
Maybe, try this:
@ Hemingray, What CSS rule did you try?
Like the thread creator, you should also post a link to the problem here!
What CSS file did you put it in? (Possibly the wrong template style was used?)
Maybe, try this:
hr {
max-width: 100%;
border-top: 5px solid var(--primary);
}
- more than a month ago
- Commercial Templates
- # 3
Thank you for your response.
I tried:
hr {
max-width: 100%;
height: 1; }
When I look at the web page, there is a thickish red line, centered and taking up half the width of the article. I have tried what you have suggested, but it has made no difference. I am wondering if there is an overriding setting in the template. Incidentally, I made a mistake in my first post. The template I am using is actually Hayley. A screenshot of the horizontal rule is attached.
Ray
I tried:
hr {
max-width: 100%;
height: 1; }
When I look at the web page, there is a thickish red line, centered and taking up half the width of the article. I have tried what you have suggested, but it has made no difference. I am wondering if there is an overriding setting in the template. Incidentally, I made a mistake in my first post. The template I am using is actually Hayley. A screenshot of the horizontal rule is attached.
Ray
- more than a month ago
- Commercial Templates
- # 4
Unfortunately they didn't answer two questions.
What CSS did they put it in and a link to their page!
What CSS did they put it in and a link to their page!
- more than a month ago
- Commercial Templates
- # 5
@Hemingray:
Try:
hr {
max-width: 100% !important;
height: 1; }
And did you empty all you caches?
Try:
hr {
max-width: 100% !important;
height: 1; }
And did you empty all you caches?
- more than a month ago
- Commercial Templates
- # 6
Hello
The above should work but you can also try adding the following to the Custom CSS field of your templates parameters (Extensions -> Templates -> [YourTemplateStyle] -> Custom CSS)....
Ciaran
The above should work but you can also try adding the following to the Custom CSS field of your templates parameters (Extensions -> Templates -> [YourTemplateStyle] -> Custom CSS)....
hr {
max-width: none;
}
Ciaran
- more than a month ago
- Commercial Templates
- # 7
Thank you to everyone who has suggested alternative definitions for hr. I have tried them all in Custom CSS, but none of them make any difference to the result at the front end. I still don't get a horizontal rule across the full width of the item, which is actually a module displayed full width in an article, rather than an article.
Ray
Ray
- more than a month ago
- Commercial Templates
- # 8
Hello, Ciaran.
Apologies that I have not been watching the forum in the past week. Here is a link to a page with the horizontal rule:
https://peterboroughchoral.org.uk/
The Custom CSS (one of the suggestions put to me) is currently:
hr {
max-width: 100% !important;
height: 1; }
Ray
Apologies that I have not been watching the forum in the past week. Here is a link to a page with the horizontal rule:
https://peterboroughchoral.org.uk/
The Custom CSS (one of the suggestions put to me) is currently:
hr {
max-width: 100% !important;
height: 1; }
Ray
- more than a month ago
- Commercial Templates
- # 10
Thank you Ray
Replacing your custom CSS with the following should resolve the issue..
Ciaran
Replacing your custom CSS with the following should resolve the issue..
hr {
max-width: 100% !important;
width: 100% !important;
}
Ciaran
- more than a month ago
- Commercial Templates
- # 11
Hello, Ciaran.
Excellent! I replaced the CSS I had with the latest code you have sent me and it has done the trick! The hr now covers the whole width.
Many thanks. I hope that this will also help other people.
Ray
Excellent! I replaced the CSS I had with the latest code you have sent me and it has done the trick! The hr now covers the whole width.
Many thanks. I hope that this will also help other people.
Ray
- more than a month ago
- Commercial Templates
- # 12
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »