- This topic has 15 replies, 5 voices, and was last updated 6 years, 9 months ago by Tom.
-
AuthorPosts
-
November 18, 2014 at 1:50 pm #47253Achim Klein
I’d like to implement a border left and right of the complete content to seperate optical between content and background. I tried border padding and margin with different classes, but without any success.
With .inside-header it’s getting smaller, with .container it’s getting wider. For the navigation bar I didn’ find any possibility.Could you help me? Thanks a lot in advance.
November 18, 2014 at 3:51 pm #47256TomLead DeveloperLead DeveloperHow about something like this?
.inside-article { border: 1px solid #DDD; }
November 18, 2014 at 9:54 pm #47272Achim KleinHi Tom,
many thanks for the very quick answer.
With content I meant the complete site except the background, but inclusive the header, the navigation and the footer..inside-article is only for the main article.
Is there another class which I didn’t find?November 18, 2014 at 11:52 pm #47287TomLead DeveloperLead DeveloperGive this a try:
.container { border: 1px solid #DDD; }
It may need a little tweaking, but that should be the element you’re looking for π
November 19, 2014 at 3:40 am #47338Achim KleinThanks for the tip.
Whether it was not exactly what I’m looking for, I found a solution.
It was a combination of some classes:.site-header { border-left: 40px solid #ABC6C9; border-right: 40px solid #ABC6C9; } .main-navigation { border-left: 40px solid #ABC6C9; border-right: 40px solid #ABC6C9; } .container { border-left: 40px solid #ABC6C9; border-right: 40px solid #ABC6C9; } .site-footer { border-left: 40px solid #ABC6C9; border-right: 40px solid #ABC6C9; }
November 19, 2014 at 8:32 am #47406TomLead DeveloperLead DeveloperGlad you found a solution! That’s a lot of border! π
August 28, 2017 at 3:33 am #374572vemvem6I found this topic from search and it did MOST of job for me with
`.inside-article { border: 1px solid #DDD; }’
However, the section “leave a comment” is not addressed here (and the border effect is not applied). How can I target it with CSS?
Thanks!
August 28, 2017 at 8:30 am #374708LeoStaffCustomer SupportThis selector should work:
.comments-area
August 28, 2017 at 7:13 pm #375070vemvem6Awesome, thanks! Works like a charm π
August 28, 2017 at 7:42 pm #375082LeoStaffCustomer SupportNo problem π
November 21, 2017 at 8:19 pm #430363jeremyHI IM TRYING TO ADD A BORDER TO MY WEBPAGE AROUND EVERYTHING INCLUDING HEADER IMAGE. I INSERTED THIS CSS BUT THE HEADER IMAGE HAS NO BORDER
.site-header {
border-left: 20px solid #222222;
border-right: 20px solid #222222;
}
.main-navigation {
border-left: 20px solid #222222;
border-right: 20px solid #222222;
}
.container {
border-left: 20px solid #222222;
border-right: 20px solid #222222;
}
I WAS WONDERING THE WIDTH OF MY HEADER MAY BE SOMETHING TO DO WITH THIS ITS CURRENTLY SET AT 1300 PX
PRETTY NEW TO CSS PLEASE BE GENTLENovember 21, 2017 at 9:12 pm #430380TomLead DeveloperLead DeveloperHave you considered doing something like this?: https://docs.generatepress.com/article/adding-a-container-wrapper/
November 21, 2017 at 10:19 pm #430399jeremyThanks for swift reply howecer this method dont seem to do anything i will have a play with it some more
November 21, 2017 at 10:32 pm #430407TomLead DeveloperLead DeveloperOnce you’ve added the container div, you can apply a border to it which will surround every element within it. It should work perfectly for what you’re after π
November 22, 2017 at 2:26 am #430473jeremycheers i played around a bit and added this
body { border: 14px solid #222222}
this seems to have done the trick. trouble is more luck than knowledge -
AuthorPosts
- You must be logged in to reply to this topic.